Integer as sum of 6 positive squares

726 Views Asked by At

Can every integer be written as sum of exactly $6$ positive squares?

I am also curious to know when an integer can be written as sum of exactly 8 squares.

I know the problem is related to Waring-Hilbert Theorem, but I couldnn't find anything specific.

If it is not possible for every integer then what type of integers can be written as sum of 6 (and 8) squares?

Edit: It appearss to me that I have to be more 'specific'. All squares are non-zero. And by every integer, I mean, integers after a large number, so that 1, 2, 3 ... does not become counterexample!

2

There are 2 best solutions below

1
On BEST ANSWER

Here's a way to show that every sufficiently large integer is a sum of eight positive squares.

Legendre's three-square theorem guarantees (among much else) that every number congruent to $3$ mod $8$ is the sum of three squares, and it's easy to see that all three squares must be odd, hence nonzero. Any sufficiently large integer $N$ can be reduced to a number $k\equiv3$ mod $8$ by subtracting three squares, each from the set $\{1,4,16\}$ and either $5=1^2+2^2$ or $17=1^2+4^2$. That is, noting that $\{1,4,16\}\equiv\{0,1,4\}$ mod $8$ and $\{5,17\}\equiv\{1,5\}$ mod $8$, we see that

$$\begin{align} \{0,1,4\}+\{0,1,4\}+\{0,1,4\}+\{1,5\} &\equiv\{0,1,2,4,5\}+\{0,1,4\}+\{1,5\}\\ &\equiv\{0,1,2,3,4,5,6\}+\{1,5\}\\ &\equiv\{0,1,2,3,4,5,6,7\}\mod 8 \end{align}$$

which covers all the residue classes mod $8$. Thus we can write

$$N=a^2+b^2+c^2+m^2+n^2+x^2+y^2+z^2$$

with $a,b,c\in\{1,2,4\}$, $m^2+n^2\in\{5,17\}$, and $x^2+y^2+z^2\equiv3$ mod $8$.

For example, $68-16-16-16-17=3$, so

$$68=4^2+4^4+4^2+1^2+4^2+1^1+1^1+1^1$$

In fact, since $16+16+16+17=65$ is the largest that need ever be subtracted from $N$ to get a remainder congruent to $3$ mod $8$, the only numbers that cannot be expressed as the sum of eight positive squares must all be less than $65$. It shouldn't be too hard to find the complete list (in particular the largest number not expressible as the sum of eight positive squares), but I don't see any really easy way to do it that doesn't boil down to a boatload of arithmetic. Maybe someone else can.

Remark: This argument almost works for six positive squares as well. That is, $\{0,1,4\}=\{0,1,4\}+\{0,1,4\}\equiv\{0,1,2,3,4,5,6\}$ mod $8$ lacks only a $7$. This implies any (sufficiently large) $N\not\equiv2$ mod $8$ can be written in the form $a^2+b^2+c^2+x^2+y^2+z^2$ with $a,b,c\in\{1,2,4\}$ and $x^2+y^2+z^2\equiv3$ mod $8$. (The set $\{5,17\}$ doesn't help here, since $\{0,1,4\}+\{1,5\}\equiv\{1,2,5,6\}$ lacks $7$ as well.) Maybe some separate argument could account for the missing residue class.

2
On

As $$13^2=12^2+5^2=12^2+4^2+3^2,$$ and every positive integer can be written as sum of four squares (i.e., of up to four non-zero squares), we conclude that every integer $n\ge 338$ can be written as sum of exactly six positive squares by appending two to six squares to a representation of $n-338$ as up to four squares.