<s>[INST] Use generating functions to calculate the sum $\sum_{k=0}^n (k+1)(n-k+1)$ Use generating functions to calculate the sum  $\sum_{k=0}^n (k+1)(n-k+1)$
And Prove it by induction.
Attempt:
$$A(x)= \sum_{k=0}^n (k+1)(n-k+1)$$
$$\sum_{n=0}^\infty(\sum_{k=0}^n (k+1)(n-k+1))x^n$$
The series of differences is :$\{(n+1),2(n),3(n-1),4(n-2)…,1,…\}$
The generating functions of this series is : $(1-x)A(x)$
The series of differences is :$\{(n+1),(n-1),(n-3),(n-5),…,2-n,…\}$
The generating functions of this series is : $(1-x)^2A(x)$
The series of differences is :$\{(n+1),-2,-2,-2,…,-2,…\}$
The generating functions of this series is : $(1-x)A^3(x)$
The series of differences is :$\{(n+1),-(n+3),0,0,…,0,…\}$
The generating functions of this series is : $(1-x)^4A(x)$
On the other hand, the generating functions $(n+1)+(-n-3)x$,
Therefore: $(1-x)^4A(x)=(n+1)+(-n-3)x$
$$A( x) =\frac{( n+1) +( -n-3) x}{( 1-x)^{4}} =(( n+1) +( -n-3) x) \cdot \sum _{n=0}^{\infty }\binom{n+4-1}{4-1} x^{n}$$
$$\displaystyle \sum _{k=0}^{n}( k+1)( n-k+1) =\sum _{n=0}^{\infty }( n+1) \cdot \binom{n+4-1}{4-1} x^{n} +\sum _{n=0}^{\infty }( -n-3) \cdot \binom{n+4-1}{4-1} x^{n+1}$$
Prove in with induction :
\begin{aligned}
( n+1) \cdot \binom{n+3}{3} +( -n-3)\binom{n+2}{3} & =\frac{( n+3)( n+2)( n+1)^{2} n}{3!} +\frac{( n+2)( n+1)( n-1) n( -n-3)}{3!}\\
 & =\frac{( n+3)( n+2)( n+1)^{2} -( n+2)( n+1)( n+3) n}{6}\\
 & =\frac{( n+3)( n+2)( n+1)}{6}\\
 & =\frac{1}{6}\left( n^{3} +6n^{2} +11n+6\right)
\end{aligned}
$$\displaystyle \sum _{k=0}^{n}( k+1)( n-k+1) =\frac{1}{6}\left( n^{3} +6n^{2} +11n+6\right)$$
induction basis: $n=0$
$$\displaystyle \sum _{k=0}^{n}( 0+1)( 0-0+1) =1=\frac{1}{6}\left( 0^{3} +6\cdotp 0^{2} +11\cdotp 0+6\right)$$
For $n+1$:
\begin{aligned}
\sum _{k=0}^{n+1}( k+1)( n-k+1) & =\sum _{k=0}^{n}( k+1)( n-k+1) +( n+2)(( n+1) -( n+1) +1)\\
 & =\frac{1}{6}\left( n^{3} +6n^{2} +11n+6\right) +( n+2)\\
\end{aligned}
If anyone can enlighten me, and find my mistakes I appreciate that.
Unfortunately, I did not succeed.
 [/INST] Unclear if this is off-topic.  The OP specifically requires that generating functions be used.
Other responses have covered this constraint, so I'll show an alternative approach.
Known (or routinely proven by induction) that

*

*$\displaystyle \sum_{i = 1}^n i = \left(\frac{1}{2}\right)(n+1)(n).$


*$\displaystyle \sum_{i = 1}^n i^2 = \left(\frac{1}{6}\right) (n+1)(2n+1)(n).$
Since $(n - k + 1) = (n + 2) - (k + 1)$ 
$\displaystyle \sum_{k = 0}^n (k+1) (n - k + 1)$ can be re-expressed as
$$\sum_{k = 0}^n (k + 1) (n + 2) - 
\sum_{k = 0}^n [(k + 1) (k + 1)]. \tag{1}$$
The first summation from expression (1) above is
$$ (n+2) \sum_{k=1}^{n+1} k = (n+2) \left(\frac{1}{2}\right) (n+1)(n+2). \tag{2}$$
The second summation from expression (1) above is
$$\sum_{k=1}^{n+1} k^2 = \left(\frac{1}{6}\right) (n+2)(2n+3)(n+1). \tag{3}$$
Taking common factors between expressions (2) and (3) above, you have that the overall computation is
$$\left(\frac{1}{6}\right)(n+1)(n+2) ~~[3(n+2) - (2n + 3)] $$
$$= ~~ \left(\frac{1}{6}\right)(n+1)(n+2)(n+3) = \binom{n+3}{3}.$$
</s>