Assume all these numbers are positive integers and the followings:

  • $-a+b+c$ is divisible by 5,
  • none of $a$, $b$ and $c$ are divisible by 5,
  • $a$ is even and the other two are odd numbers.

How can we show that $a^2+b^2+c^2$ is not or is divisible by 5?

Expanding will result in $-ab-ac+bc=5h$ for some integer $h$. But then I cannot find other ways to dig more.

Another approach is to get the reminder of $a$, $b$ and $c$ and assume a similar problem, but this time $0<a,b,c<5$ and $-a+b+c=0$, which seems to be easier to deal with, but still I could not continue.

  • 1
    $\begingroup$ Have you made any attempt, if so then please update it here. No one here is interested in doing your homework. $\endgroup$ Aug 11, 2021 at 8:46
  • $\begingroup$ Thanks guys. This is not a homework, but rather a question of my own. I will update the question with some information. $\endgroup$
    – Optima
    Aug 11, 2021 at 8:47
  • $\begingroup$ "How can we show that $a^2+b^2+c^2$ is not or is divisible by 5?" Isn't that trivially true? $\endgroup$
    – AlvinL
    Aug 11, 2021 at 9:01
  • $\begingroup$ I mean is it true that this is not divisible by 5? and if not, under what conditions it is divisible by 5. $\endgroup$
    – Optima
    Aug 11, 2021 at 9:02

2 Answers 2


The mod-5 residue of $n^2$ is either $0$ or $±1$. For $a^2+b^2+c^2\equiv0\pmod 5$ at least one of the three must be a multiple of $5$.


$a=b=c=5 \to a^2+b^2+c^2=3\cdot 5^2$ is divisible by 5

$a=b=1, c=5 \to 1^2 + 1^2 + 5^2=27$ is not divisible by 5

[UPD] if none of the number is divisible by 5: $$-a+b+c\equiv 0 \pmod 5 \to a\equiv b+c \pmod 5$$ Using $\gcd(2, 5)=1$ $$a^2+b^2+c^2\equiv 2bc+2b^2+2c^2\equiv 0 \pmod 5 \iff bc+b^2+c^2\equiv 0 \pmod 5$$

Three cases:

  • $b\equiv \pm1 \pmod5, c\equiv\pm1\pmod5$ then $bc+b^2+c^2\equiv \pm1+1+1\not\equiv 0 \pmod 5$
  • $b\equiv \pm2\pmod5, c\equiv\pm2\pmod5$ then $bc+b^2+c^2\equiv \pm4+4+4\not\equiv 0 \pmod 5$
  • $b\equiv \pm1\pmod5, c\equiv\pm2\pmod5$ then $bc+b^2+c^2\equiv \pm2+1+4\not\equiv 0 \pmod 5$

The conclusion it is not divisible by 5

  • $\begingroup$ Thanks. I should have been more specific. I will update the question. All these trivial cases are excluded. $\endgroup$
    – Optima
    Aug 11, 2021 at 8:49
  • $\begingroup$ Rather than break it up into cases this way, we can look when $b \equiv c \mod 5$ we have $3b^2\equiv 0 \mod 5$, which means $b \equiv 0 \mod 5$, a contradiction. So now the other case when $b \not \equiv c \mod 5$ we can rewrite $b^2+bc+c^2=\frac{b^3-c^3}{b-c}$ and ask when is $b^3\equiv c^3 \mod 5$? Since there is no element of order $3$, $b\equiv c \mod 5$ and again we have a contradiction. $\endgroup$
    – Merosity
    Aug 11, 2021 at 9:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .