This is the same as $\sum_{k=1}^n\sum_{j=1}^kj^2$
So $\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}$ $=\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$