3

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!

Parcly Taxel
  • 103,344
Michael
  • 489
  • $5$ is not the sum of $6$ or $8$ positive squares. – Peter Jun 11 '18 at 22:18
  • @Peter $1^2+1^2+1^2+1^2+1^2+0^2(+0^2+0^2)$? – Rhys Hughes Jun 11 '18 at 22:18
  • You mean positive squares, right ? If not, you can add zero-squares to get the desired number of squares. – Peter Jun 11 '18 at 22:19
  • @MikeSQ I think what Peter is trying to say is: "Is $0^2$ allowed? You haven't specified." – Arthur Jun 11 '18 at 22:19
  • @Arthur If zero is allowed, the question easily follows from the four-squares-theorem. – Peter Jun 11 '18 at 22:21
  • @RhysHughes $0$ is not a positive square – Peter Jun 11 '18 at 22:22
  • In both cases, all numbers larger than 100 can be so written. This follows from the known solution of four non-zero squares, which I answered for Peter within the past few days https://math.stackexchange.com/questions/2813588/classification-of-the-positive-integers-not-being-the-sum-of-four-non-zero-squar/2813815#2813815 – Will Jagy Jun 11 '18 at 22:32
  • @WillJagy Can we always subtract two suitable positive squares (or four) to arrive at a number being a sum of four positive squares ? OK, I see this is easily possible because almost all odd numbers are the sum of four positive squares. – Peter Jun 11 '18 at 22:34
  • 1
    @Peter yes, of course, once the original number is above, say, 100. By that point, the only possible problems are the $4^k \cdot { 2,6,14}$ and a suitable subtraction will avoid these. – Will Jagy Jun 11 '18 at 22:37
  • @Peter easy if you are willing to get some paper and practice drawing them; with, for example, my many drawings on MSE as a guide. – Will Jagy Jun 11 '18 at 22:41
  • @WillJagy OK, I will have a look at such drawings. – Peter Jun 11 '18 at 22:43
  • @Peter I put a list of answer links at your question; much too long for a comment box – Will Jagy Jun 11 '18 at 22:48
  • I want that too, so.... https://math.stackexchange.com/a/2816328/257587 – Michael Jun 11 '18 at 22:52

2 Answers2

2

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.

  • please see https://math.stackexchange.com/questions/2813588/classification-of-the-positive-integers-not-being-the-sum-of-four-non-zero-squar/2813815#2813815 – Will Jagy Jun 11 '18 at 22:39
  • Anyway, once a number is above 100, for six squares we can subtract off either 2 or 5 to get a number (odd and above 50) representable as four nonzero squares. For eight squares, subtract 4 or 7 to get an odd number. – Will Jagy Jun 11 '18 at 22:43
1

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.

Barry Cipra
  • 79,832