1^2+(1^2+2^2)+(1^2+2^2+3^2)+............. n terms
This is the same as $\displaystyle \sum_{k=1}^n\sum_{j=1}^kj^2$
So $\displaystyle \sum_{k=1}^n\sum_{j=1}^kj^2=\sum_{k=1}^n\frac{k(k+ 1)(2k+1)}{6}=\sum_{k=1}^n\frac{k^3}{3}+\frac{k^2}{ 2}+\frac{k}{6}$ $\displaystyle =\frac{1}{3}\left[\frac{n(n+1)}{2}\right]^2+\frac{n(n+1)(2n+1)}{12}+\frac{n(n+1)}{12}=\tfra c{1}{12}n(n+2)(n+1)^2$