Example 3.3 Find the sum $\sum_{k=0}^{n} k(k-1)(k+2)$.


Let $f(n)=n(n-1)(n+2)$, then $f(n)$ is a cubic polynomial in $n$ and the difference table of the sequence $\{f(n)\}_{n \geqslant 0}$ is

Since $f(0)=0, \Delta f(0)=0, \Delta^{2} f(0)=8, \Delta^{3} f(0)=6$, we have
$$
\begin{array}{l}
\sum_{k=0}^{n} k(k-1)(k+2)=\sum_{k=0}^{n} f(k) \\
=\sum_{j=0}^{3}\binom{n+1}{j+1} \Delta^{j} f(0) \\
=\binom{n+1}{1} \cdot f(0)+\binom{n+1}{2} \Delta f(0)+ \\
\binom{n+1}{3} \Delta^{2} f(0)+\binom{n+1}{4} \Delta^{3} f(0) \\
=8 \cdot\binom{n+1}{3}+6 \cdot\binom{n+1}{4} \\
=\frac{n\left(n^{2}-1\right)(3 n+10)}{12} \\
=\frac{1}{4} n^{4}+\frac{5}{6} n^{3}-\frac{1}{4} n^{2}-\frac{5}{6} n . \\
\end{array}
$$