Is it known whether any positive integer can be written as the sum of $n$ different squares?

693 Views Asked by At

Is it known whether any sufficiently large positive integer can be written as the sum of four different squares? I know that every positive integer can be written as the sum of four not necessarily different squares.

Furthermore, OEIS has a sequence of numbers that can be written as the sum of any number of different squares: A003995. The largest integer not in the sequence is 128.

Is there anything known about this? If so, can someone give a reference to the proof or give a sketch how to proof it?


Update (Thanks, Mark Bennet!) :

From Jacobi's four-square theorem it follows that there are only 24 ways to write a power of two as the sum of four squares. However, if all those squares are different, there are at least 16*24>24 ways, since there are 16 ways to choose sign and 24 ways to choose order. Therefore a power of two cannot be written as the sum of four different squares. Is this correct?

If so, I want to restate my question. Is it, for any integer $n$, known whether any sufficiently large positive integer can be written as the sum of $n$ different squares?

1

There are 1 best solutions below

0
On BEST ANSWER

Thank you guys, for the helpful comments.

From @MarkBennet's comment I was able to proof that four squares aren't sufficient:

From Jacobi's four-square theorem it follows that there are only 24 ways to write a power of two as the sum of four squares. However, if all those squares are different, there are at least $16\cdot24>24$ ways, since there are 16 ways to choose sign and 24 ways to choose order. Therefore a power of two cannot be written as the sum of four different squares.


The post that @Meelo linked linked to another question (Represent an integer as a sum of n non-consecutive squares) where I found this:

Halter-Koch proved in 1982 that any integer greater than 245 is the sum of 5 distinct squares.

Therefore my question is answered. :)