Find a generating function for $\sum_{k=0}^{n} k^2$ 
Find a generating function for $\sum_{k=0}^{n} k^2$

I know my solution is wrong, but why?  
My solution:
If $F(x)$ generates $\sum_{k=0}^{n} k^2$ then $F(x)(1-x)$ generates $k^2$.  
$\frac{x}{(1-x)^4}: \left\{ 0,1,4,9,16,25...  \right\}$
$\frac{x}{(1-x)^3}: \left\{ 0,1,3,5,7,9...  \right\}$
$\frac{x}{(1-x)^2}: \left\{ 0,1,2,2,2,2...  \right\}$
$\frac{x}{1-x}: \left\{ 0,1,1,1,1,1...  \right\}$
$x: \left\{ 0,1,0,0,0,0...  \right\}$  
So, $F(x)=\frac{x}{(1-x)^5}$ generates $\sum_{k=0}^{n} k^2$

According to the example, how to get the generating function for squares you can do the following:
Use $$
    \sum_{n=0}^{\infty}\binom{n+k}k x^n= \frac{1}{(1-x)^{k+1}} $$
and set
$$
a\binom{n+3}{3}+ b\binom{n+2}{2}+c\binom{n+1}{1}+d=\frac{n^3}{3}+\frac{n^2}{2}+\frac n2=\sum_{k=1}^n k^2
$$
You'll find $a=2,b=-3,c=1$ and $d=0$. So
$$
\frac{2}{(1-x)^4}-\frac{3}{(1-x)^3}+\frac{1}{(1-x)^2}
$$
is the generating function, which sums up to Daniel's answer...
