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?
2026-03-28 05:22:53.1774675373
On
On
On
Deciding if numbers can be written as the sum of three squares
1.1k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
4
There are 4 best solutions below
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:
- 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)
- divide by 8 to get k and find the remainder
- 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).
If you know the deep theorem (whose proof is very far from being trivial, relying on Lagrange's identity for quaternions)
to check if $154,155,156$ are $\square+\square+\square$ is straightforward.