0
$\begingroup$

Let $a, b$ be non-negative integers and $p\ge3$ be a prime number. If $a^2+b^2$ and $a+b$ are divisible by $p$ does it mean $a$ and $b$ are always divisible by $p$?

$\endgroup$
  • $\begingroup$ Yes, it is true. Try to show that $a-b$ is also divisible by $p$, from the fact that $(a-b)^2$ is a multiple of $p$. Note that this is not true for $p = 2$. $\endgroup$ – астон вілла олоф мэллбэрг Oct 5 '17 at 0:11
  • $\begingroup$ Note that $a^2+b^2=(a+b)^2-2ab$ and use Euclid's lemma to conclude that $p$ must divide $a$ or $b$. $\endgroup$ – Prasun Biswas Oct 5 '17 at 0:20
0
$\begingroup$

Suppose $p$ be an odd prime.

Note that $a^2+b^2=(a+b)^2-2ab$ and use Euclid's lemma to conclude that $p$ must divide $a$ or $b$.

Now, assume that only one of $a,b$ (WLOG say $a$) is divisible by $p$.

Since $p\mid a+b$ and $p\mid a$, we get $p\mid (a+b)-a=b$, i.e., $p\mid b$, a contradiction.

$\endgroup$
1
$\begingroup$

Since $a+b\equiv 0 \bmod p$, we have $a\equiv -b $ and thus $ a^2\equiv b^2 \bmod p$.

Then $a^2+b^2\equiv 2a^2 \equiv 0 \bmod p$ and since $p>2$ we know $p\mid a^2$ and thus $p\mid a$ and $p\mid b$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.