Let a,b be integers. Then $3 | a^2 + b^2$ if and only if 3 | a and 3 | b

208 Views Asked by At

I need to prove this using modular arithmetic but I'm a little stuck. Could I get some pointers? Thank you.

Let $a,b$ be integers. Then $3 | a^2 + b^2$ if and only if $3 | a$ and $3 | b$

1

There are 1 best solutions below

2
On

I'm sure you can show that $3|a, 3|b \implies 3|a^2+b^2$ fairly easily. For the other way, note that $x^2\equiv 1 \pmod 3 $ when $3$ doesn't divide $x$.