What is the explanation for this visual proof of the sum of squares? Supposedly the following proves the sum of the first-$n$-squares formula given the sum of the first $n$ numbers formula, but I don't understand it. 


That first triangle is the sum of one $1$, two $2$s, three $3$s, and so on. That's equivalent to $1^2+2^2+\dots +n^2$.
The second triangle is just a $120^\circ$ counterclockwise rotation of the first triangle.
The third triangle is a $120^\circ$ clockwise rotation of the first triangle.
Now, note that the top numbers sum to $2n+1$. And the numbers directly below and to the left of each of the top numbers. And pretty much every single group of three numbers corresponding to the same position on the triangles.
So the RHS is just one $2n+1$, then two $2n+1$s, then three, and so on up to $n$. So the RHS is really $\frac{n(n+1)}{2}(2n+1)$ because of the triangular number formula.
This means that $3(1^2+2^2+\dots +n^2)=\frac{n(n+1)(2n+1)}{2}$, so $\boxed{1^2+2^2+\dots+n^2=\frac{n(n+1)(2n+1)}{6}}.$
Edit: Beaten to it :P
