TITLE: The four-square theorem from the Gauss-Legendre three-square theorem
QUESTION [7 upvotes]: I've been studying some proofs of the four-square theorem. Some of them are pretty clear. However, I came across a statement that the four-square theorem can be easily derived from Gauss-Legendre three-square theorem.
Hard as I tried, I couldn't find out how to do it.
I was hoping someone could give me some idea or point out some article.
Thank you!

REPLY [8 votes]: Also, the Gauß/Legendre theorem in question implies the following (improved) version of the four-squares theorem:
Every positive integer is the sum of four POSITIVE squares unless it belongs to the set
$A \cup B$
where
$A$ $=$ {$1, 3, 5, 9, 11, 17, 29, 41$}
and
$B$ $=$  {$2\cdot 4^{m}: m \in \mathbb{Z}^{+}$} $\cup$ {$6\cdot 4^{m}: m \in \mathbb{Z}^{+}$} $\cup$ {$14\cdot 4^{m}: m \in \mathbb{Z}^{+}$}.
Proof (d'après Prof. J. H. Conway in "The sensual quadratic form" [page 140]). By Gauß/Legendre and the well-known result on numbers that can be written as a sum of two squares it follows that every natural number of the form $8k+3$ (or $8k+6$) is the sum of three positive squares. Multiplying by $4$, we see that the same conclusion applies to natural numbers of the forms $32k+12$ and $32k+24$. Then, one can show that any integer $>49$ which is not a multiple of $8$ is the sum of four positive integers by subtracting an square so as to obtain a number of one of the aforementioned forms (for instance, from a number of the form $8k+2$ subtract $2^{2}$ in order to obtain a number of the form $8k+6$...). The proof is completed by checking the numbers up to $49$ and verifying that a number $n$ divisible by $8$ is the sum of four positive squares only if $\frac{n}{4}$ is. QED.