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. 


The first row of the first triangle is $1 = 1^2$, the second row sums to $2 + 2 = 2^2$, the third row sums to $3 + 3 + 3 = 3^2$ and so on. That means that the sum of the numbers in the triangle is $1^2 + 2^2 + 3^2 + \dots + n^2$.  Now, the second and third triangles are the same, so the left-hand side is $3(1^2 + 2^2 + \dots + n^2)$.
On the other hand, each of the numbers in the right-hand side triangle is $(2n+1)$, and there are $\frac{n(n+1)}{2}$ of them.
The picture shows why the two are equal, so we get $3(1^2 + 2^2 + \dots +n^2) = (2n+1)\frac{n(n+1)}{2}$, which becomes the formula $1^2 + 2^2 + \dots + n^2 = \frac{n(n+1)(2n+1)}{6}$.
