Three Squares Theorem: if is a positive integer not of the form , then is the sum of three squares.
We present a proof using geometry of numbers due to Ankeny.
We prove it for the case , and squarefree. Let
Find a prime such that for all .
Therefore we find solutions to
implies for some
Now consider the which represent a symmetric convex region of area
Hence by Minkowski’s theorem contains a non-zero integers point
Note that are not integers.
implies that
If we show that is a sum of two squares we are done.
Let an odd prime dividing with odd multiplicity.
Assume doesnt divide – we see that
If divides , gives
if doesnt divide , , so
Thus we have and which implies
If divides , then
But , for dividing . Hence
In all the cases, we get thereby establishing that all odd factors of with odd multiplicity are modulo which implies that can be written as sum of squares.
Therefore is a sum of three squares.
The cases are similar.
Ankeny’s Paper: https://www.ams.org/journals/proc/1957-008-02/S0002-9939-1957-0085275-8/S0002-9939-1957-0085275-8.pdf