Deciding if numbers can be written as the sum of three squares

1.1k Views Asked by At

I am asked to decide if 154, 155 and 156 can be written as the sum of three squares. I am using the theorem that if $n\in S_3$ then $n\not= 4^e(8k+7)$. Now just looking at all of these numbers it doesn't seem to me that there is a way for any of them to be written this way so I think they must all $\in S_3$? Is this correct? Is there a specific way to show this or would have have to write out all possibilities such as $4^0(8(19)+2)...4^1...4^2$ for each?

4

There are 4 best solutions below

0
On BEST ANSWER

If you know the deep theorem (whose proof is very far from being trivial, relying on Lagrange's identity for quaternions)

Every number that is not of the form $4^m(8k+7)$ is the sum of three integer squares

to check if $154,155,156$ are $\square+\square+\square$ is straightforward.

  1. $154=2\cdot 77$, hence $\nu_2(154)$ is odd and there are no issues;
  2. $155$ is odd and $\equiv 3\pmod{8}$, no issues;
  3. $156=4\cdot 39$ and $39\equiv 7\pmod{8}$, hence $156\neq \square+\square+\square$.
0
On

For the first two numbers, you certainly can't apply that result and as a matter of fact, you could easily check that 154=144+9+1 and 155=121+25+9. For the third one, you might want to think about the fact that $156=4 \cdot 39 = 4 \cdot (8\cdot4 + 7)$.

0
On

We have $$ 3^2+8^2+9^2 = 154, $$ and $$ 5^2+7^2+9^2 = 155. $$ $156$ is not a sum of three squares, since $156 = 4\cdot(8\cdot4+7)$.

4
On

Answers just show how the numbers can be written as desired. In practice:

  1. count and remove each factor of 4 (i.e. while last two digits are divisible by 4, add 1 to the tally for e and reduce the number by 4)
  2. divide by 8 to get k and find the remainder
  3. the number is now $4^e(8k+r)$. If $r$ is 7 the number cannot be written as a sum of 3 squares.

It also cannot be written as a sum of 3 positive squares if $r$ is $0$ or $8k+r$ is in {1, 2, 5, 10, 13, 25, 37, 58, 85, 130, $a_{11}$} where $a_{11}$ (if it exists) is a number greater than $5 \cdot 10^{10}$ (see here).