Find the generating function for $c_r = \sum^r_{i=1}i^2$ Find the generating function of
where $c_0 = 0, c_r = \sum^r_{i=1}i^2$.
Hence show that
$\sum^r_{i=1}i^2 = C^{r+1}_3 + C^{r+2}_3$
Attempt:
$c_r = \sum^r_{i=1}i^2$
= $x + 4x^2 + 9x^3 + ... + r^2x^r$
= $x(1 + 4x + 9x^2 + ... + r^2x^{r-1})$
= $x(\frac{1}{1-2x})$
How do i proceed from here? Is this even right?

Let $C(t) := \sum_{n\ge0}c_nt^n$ be the generating series. Then, sung the fact that
$$c_n = c_{n-1} + n^2$$
for $n>0$, we have
\begin{align}
C(t) = & \sum_{n\ge0}c_nt^n\\
= & c_0 + \sum_{n\ge1}(c_{n-1}+n^2)t^n\\
= & tC(t) + \sum_{n\ge0}n^2t^n\\
= & tC(t) + t\frac{d}{dt}\left(t\frac{d}{dt}\sum_{n\ge0}t^n\right)\\
= & tC(t) + t\frac{d}{dt}\left(t\frac{d}{dt}\frac{1}{1-t}\right)\\
= & tC(t) + \frac{t}{(1-t)^2}.\\
\end{align}
Therefore,
$$C(t) = \frac{t}{(1-t)^3}.$$
