An underappreciated formula: Sum of n squares

I’ve had a few opportunities recently to teach one of my favorite formulas.

You might know that the sum of the first n counting numbers is given by this:

Well, how about the sum of the first n squares? Turns out there’s a formula for that too, and it’s super-useful.

So for example, the sum of the first 8 squares is 8 • 9 • 17 / 6 = 204. Add 1 + 4 + 9 + … + 64 manually, and you’ll see that it works.

Why is the formula true? I was asked. Well, if you have the algebra background, you can plug in n=k and n=k-1, then subtract — you’ll see that the difference is k squared. So we can use that to prove it by mathematical induction.

(If you want to see a picture of how it works, check out Nelsen’s Proofs Without Words. There are five (!) visual proofs in there.)

This pops up in all sorts of counting, casework, and other problems and it can be a huge time saver. For middle- and high-schoolers going to math contests, it’s worth memorizing.

(While you’re at it…. The formula for the sum of cubes is actually much easier to remember — it’s basically the square of the first formula.)