## 403/503 – Lagrange's four squares theorem

It is a theorem of Lagrange that every natural number is the sum of 4 squares. (Since 7 is not a sum of 3 squares, 4 is best possible. Gauss showed that a number is a sum of 3 squares iff it is not of the form $4^a(8k+7).$)

Although there are elementary proofs of this result (elementary here means in the sense of number theory. It is not a synonym for easy), I have always found the proof sketched in problem 1 of this pdf (from a course I taught a few years ago) to be quite charming. It uses a bit of the ideas we have recently discussed, so I figured you may be interested in taking a look at it.