Show that $\sum_{i=1}^{r} i^2 = \binom{r+1}{3} + \binom{r+2}{3}$ by finding generating function Find the generating function for the sequence $c_r$ where $c_0 = 0$ and $ c_r = \sum_{i=1}^{r} i^2 $ for $r \in \mathbb N$. Hence show that  $\sum_{i=1}^{r} i^2 = \binom{r+1}{3} + \binom{r+2}{3}$
EDIT:
Sorry, I forgot to mention what I got so far. 
Since 
$c_0 = 0$
$c_1 = 1$
$c_2 = 1 + 4$
Hence, the generating function for $c_r$ is 
$C(x) = 0 + 1x + (1+4)x^2 + (1+4+9)x^3 + ...$
 A: Let $C(x)$ be the GF for the sequence $\langle c_n \rangle_{n\ge 0}$, where $c_n$ is the $n^\text{th}$ partial sum of the sequence of squares. If $f(x)$ is the GF for the sequence of squares, then $\frac{f(x)}{1-x}$ is the GF for the sequence of the partial sums of squares. 
So, we first find the GF for $\langle n^2 \rangle_{n\ge 0}$. Starting from $\frac{1}{1-x} = \sum_{k=0}^\infty x^k$, we differentiate, multiply by an $x$, and do those two moves once more. Then we have 
$f(x) = \frac{x(x+1)}{(1-x)^3}.$
So the GF for the sequence of the partial sums of squares is $$C(x) =\frac{x(x+1)}{(1-x)^4} = \dfrac{x^2}{(1-x)^4} + \dfrac{x}{(1-x)^4}.$$
By Newton's binomial theorem, these two terms are
$$C(x) = \sum_{k=0}^\infty {{4+k-1} \choose {k}}x^{k+2} + \sum_{k=0}^\infty {{4+k-1}\choose k}x^{k+1}.$$ 
After playing around with our indices, we have 
$$\sum\limits_{k=0}^\infty c_k x^k  = 1+\sum_{k=2}^\infty \left[ {{k+1} \choose {k-2}} + {{k+2}\choose {k-1}} \right]x^{k}.$$
Comparing coefficients and using the identity ${n \choose k} = {n \choose {n-k}}$, we have 
\begin{align*}
c_0 &= 0 \\
c_1 &= 1 \\
c_n &= {{n+1} \choose 3} + {{n+2}\choose 3}.
\end{align*}
