Today Mr Bean taught me the following sum of squares formula. Well, perhaps not first discovered by him, but we have found a nice geometric proof.
Theorem 1 (Bean’s theorem, 2010)
Instead of proving it directly, let me show how to “find” first. We want to count the number of points of the following blue pyramid, which consists of 3 levels, top level having only 1 point, second having and the third having .
We consider a cube positioned on the positive axis as below:
There are integer points in the cube () and we color them into 4 groups. The point furthest from the origin (i.e. ) is colored brown. For the remaining points, we divide them into three levels. Here is the first level:
This level consist of all points such that one of the coordinates is zero, i.e. they lie on one of the coordinate plane. The origin is colored red. For the remaining points, those lying on one of the axis is colored green, all the remaining points in this level are colored blue. Note that the blue points (in this level) are naturally divided into three groups, each group have the same number of points as the “base” of the previous blue pyramid.
Now consider the second level:
This level consists of all points such that one of the coordinates is 1 (it lies “above” the previous level). Similar to the previous coloring, the point is colored red. For the remaining, those lying on the coordinate axis after a translation of is colored green, and the remaining are colored blue. Again, the blue points are divided into three groups, and each group correspond to the second level of the above blue pyramid.
The third level looks like this:
The coloring is similar as before and I don’t think I need further explanation.
Putting the three levels together, they look something like this:
Now we count the number of points of the blue pyramid. Obviously, if we throw away the brown one, the total number of points is . For these points, we can see from the figure that they contain three blue pyramids, and the green points are naturally divided into 3 groups, each group have (they form an arithmetic progression!) points. So total number of green points is . Finally, it is clear that there are 3 red points. So we arrive at
In general, by the arithmetic progression formula , it is easy to see (after some arithmetic) that Bean’s formula holds true.