Sum of squares and quadratic residues

143 Views Asked by At

I found the following statement:

"If sum of three numbers which are squares is divisible by $9$, then difference of two of these three numbers is divisible by $9$."

This can be proved by considering quadratic residues modulo $9$. I am interested if there is some other modulus $m$ so that some similar statement holds (something like: if sum of three squares is divisible by $m$, then difference of two numbers is divisible by $m$)?

1

There are 1 best solutions below

0
On BEST ANSWER

I find that this is true for $m = 1, 2, 3, 4, 6, 8, 9, 11, 12, 16, 24, 32, 33, 36, 44, 48, 64, 96, \ldots$. It seems the sequence is not (yet) in OEIS.

{EDIT] Now it is: OEIS sequence A354620

[EDIT] One elementary fact: If it is false for $m$, it is false for $km$ for all $k$ coprime to $m$.

Proof: Suppose $a^2+b^2+c^2 \equiv 0 \pmod m$ with $a^2, b^2, c^2$ all distinct mod $m$. By the Chinese Remainder Theorem there are $a'$, $b'$, $c'$ with $a' \equiv a \pmod m$ and $a' \equiv 0 \pmod k$, similarly for $b'$ and $c'$, and then $a'^2 + b'^2 + c'^2 \equiv a^2 + b^2 + c^2 \equiv 0 \pmod m$ and $a'^2 + b'^2 + c'^2 \equiv 0 \pmod k$, implying $a'^2+b'^2+c'^2 \equiv 0 \pmod {km}$ while $a', b', c'$ are all distinct mod $km$.