<s>[INST] expression for$\sum_{k=0}^{n}(k+1)(k+2)$ what is a closed expression for$\sum_{k=0}^{n}(k+1)(k+2)$? the answer says to look at Generating function $a_k=(k+1)(k+2)$ and derive twice $\dfrac{1}{x}=1+x+x^2+...$ so the solution starts: $\sum_{k=0}^{n}(k+1)(k+2)=[\dfrac{1}{(1-x)}.\dfrac{2}{(1-x)^3}]$but isn't $\sum_{k=0}^{\infty}t^k=\dfrac{1}{(1-t)}$? so how the lhs and rhs in  $\sum_{k=0}^{n}(k+1)(k+2)=[\dfrac{1}{(1-x)}.\dfrac{2}{(1-x)^3}]$ are equal?
 [/INST] Using the generalization proven in this answer, and the substitutions
$$
\begin{align}
M&\mapsto n\\
m&\mapsto k\\
k&\mapsto 2\\
n&\mapsto 0
\end{align}
$$
we get
$$
\begin{align}
\sum_{k=0}^n(k+1)(k+2)
&=2\sum_{k=0}^n\binom{k+2}{2}\binom{n-k}{0}\\
&=2\binom{n+3}{3}
\end{align}
$$

An Alternate Approach
The recursive definition of the Pascal Triangle says that
$$
\binom{k+2}{2}=\binom{k+3}{3}-\binom{k+2}{3}
$$
Therefore,
$$
\begin{align}
\sum_{k=0}^n(k+1)(k+2)
&=\sum_{k=0}^n2\binom{k+2}{2}\\
&=2\left[\sum_{k=0}^n\binom{k+3}{3}-\sum_{k=0}^n\binom{k+2}{3}\right]\\
&=2\left[\sum_{k=0}^n\binom{k+3}{3}-\sum_{k=-1}^{n-1}\binom{k+3}{3}\right]\\
&=2\left[\binom{n+3}{3}-\binom{2}{3}\right]\\
&=2\binom{n+3}{3}
\end{align}
$$
</s>