Prove that for any primitive Pythagorean triple (a, b, c), exactly one of a and b must be a multiple of 3, and c cannot be a multiple of 3.

My attempt:

Let a and b be relatively prime positive integers.

If $a\equiv \pm1 \pmod{3}$ and $b\equiv \pm1 \pmod{3}$,

$c^2=a^2+b^2\equiv 1+1\equiv 2 \pmod{3}$

This is impossible as the only quadratic residues modulo 3 are 0 and 1.

So far, so good.

If one of a, b is $\equiv 0 \pmod{3}$ and the other is $\equiv \pm1 \pmod{3}$,

$c^2=a^2+b^2\equiv 0+1\equiv 1 \pmod{3}$

This is the part I don't understand. Just because $c^2\equiv 1\pmod{3}$ doesn't mean that $c^2$ must be a perfect square. For example, $a=12$ and $b=13$ satisfy the above conditions but $c^2=a^2+b^2=313$, which isn't a perfect square.

  • $\begingroup$ If $a,b\equiv 0$ (mod $3$) then you are done! $\endgroup$ Nov 10, 2015 at 22:30
  • $\begingroup$ $c^2$ must be a perfect square for $(a,b,c)$ to be a Pythagorean triple, primitive or not. Pythagorean triples are specified to be triples of integers, after all, so $(12,13,\sqrt{313})$ is not valid. $\endgroup$
    – Arthur
    Nov 10, 2015 at 22:33
  • $\begingroup$ I would like to note this problem has to do entirely with the congruence of a,b, and c in mod 3, and the what any x value in Z is in mod 3. The answers given show this great. Similarly, a, b, or c must be a multiple of 5 in a PPT. $\endgroup$
    – Nucl3ic
    Jan 18, 2016 at 2:00
  • $\begingroup$ In the second part all you need to prove is that $c\not \equiv 0\pmod 3$. You have shown that $c^2\equiv 1\pmod 3$ so you conclude that $3$ does not divide $c$. $\endgroup$ Sep 27, 2017 at 19:14
  • $\begingroup$ See also: Proof: primitive pythagorean triple, a or b has to be divisible by 3. $\endgroup$ Jul 10, 2020 at 13:05

2 Answers 2


Your first step was a good start: It proves that at least one of $a$ and $b$ must be a multiple of $3$. We will have to eliminate the case of both $a$ and $b$ being multiples of $3$, but that is easy: If $a=3p$ and $b=3q$ then $$c^2 = a^2+b^2 = (3p)^2 + (3q)^2 = 9(p^2+q^2) = 9m$$ so $c$ is also a multiple of $3$, in which case the triplet is not primitive, as $3$ divides all three of them.

So exactly one of $a$ and $b$ must be a multiple of $3$.

Your second step has shown that since exactly one of $a$ and $b$ is a multiple of $3$, $c \equiv 1 \pmod{3}$. You don't care that not every number of the form $3k+1$ is a square; all you care about is that the number that happens to be $c^2$ must be expressible as $3k+1$. And this completes the proof that $c$ is not a multiple of $3$.


Your proof is complete. You are asked to show that one of $a,b,c$ is divisible by $3$. In the first part you show that $a$ and $b$ can't both be non-divisible by $3$. In the second part, you assume that one of $a,b$ is divisible by $3$ and show that $c^2\equiv 1$ (mod $3$) which implies that $c$ is not divisible by $3$ and hence exactly one of $a,b,c$ is divisible by $3$.


You must log in to answer this question.

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