I have to use generating functions to evaluate the following sum :
$$\sum_{k=0}^n (k-1)k(k+1)$$
I think that first we have to find the generating function C(x) = $\sum_{n=0}^\infty (n-1)n(n+1)x^n$.
I also computed the sum on WolframAlpha and know that the final result is $$\sum_{k=0}^n (k-1)k(k+1) = \frac{(n-1)n(n+1)(n+2)}{4}$$
Any help is appreciated.
As @Winther already noted, let us define
$$f(x) = \sum\limits_{k=0}^{n} x^{k+1} = \dfrac{x(x^{n+1} - 1)}{x-1}$$
Then
$$f'''(x) = \sum\limits_{k=0}^{n} (k+1)k(k-1)x^{k-2}$$
You shall compute the third derivative of $f(x) = \dfrac{x(x^{n+1} - 1)}{x-1}$ and the answer would be $f'''(1)$.