The sum of the first n squares is
The numbers s0,s1,s2,… are called the square pyramidal numbers.
Many different proofs exist. Seven different proofs can be found in Concrete Mathematics and even a visual proof has been published (via @MathUpdate).
One of the simplest proofs uses induction on n. This approach assumes that you know (or guess) the correct formula beforehand, though.
This post will show a derivation which is a formalization of the derivation shown on wikipedia. It revolves around manipulating sums and the fact that
We will now write sn in three different ways. The first simply inserts the above expression for k2:
The second reverses the order of summation for the inner sum:
The third starts as the first and does a series of manipulations:
(the manipulations being: Switching the order of summation, change of variable j′=n+1−j, change of variable k′=k+j′−n, renaming j′→k, k′→j).
We now add together these three expressions for sn and get
which, after dividing each side by 3, produces the wanted formula.
Commenting is not possible for this post, but feel free to leave a question,
correction or any comment by using the contact page