Sum of four squares

501 Views Asked by At

I was looking for numbers who can be expressed as sum of exactly four squares and not less. And I think I have found them. They are all the integers of the form

$$4^{n}\,(7+8k);\;k,\,n\in\mathbb{N}$$

I have no idea how to prove this statement and I wonder if ALL the numbers which need four squares are this kind of numbers.

Edit

Thanks to the comments and the answer the statement can be more precise

A number can be expressed as the sum of four squares and not less if and only if it has the form

$4^n\,(7+8k);\;k,\,n\in\mathbb{N}$

1

There are 1 best solutions below

0
On BEST ANSWER

At least it is not hard to see that $4^n(7+8k)$ cannot be written as sum of three squares: $a^2+b^2+c^2\equiv m\pmod 4$ where $m$ is the number of odd squares on the left. Hence for $n\ge 1$, any representation of $4^n(7+8k)$ must use three even squares. But then this corresponds to the representation $4^{n-1}(7+8k)=(a/2)^2+(b/2)^2+(c/2)^2$ with smaller $n$. We are thus reduced to the case $n=0$, i.e., $7+8k=a^2+b^2+c^2$. By the above argument, $a,b,c$ must be odd. As odd squares are $\equiv 1\pmod 8$, we obtain $7+8k\equiv 3\pmod 8$, contradiction.

The other direction is less trivial (see comments about Legendre's theorems)