[Math] Pythagorean Triples : Show that exactly one of $x$, $y$, and $z$ is divisible by $5$

diophantine equationsdivisibilityelementary-number-theorynumber theorypythagorean triples

I was doing some basic number theory problems from Rosen and came across this problem:

Show that if $(x, y,z)$ is a primitive Pythagorean triple, then exactly one of $x$, $y$, and $z$ is divisible by $5$.

Book Solution:

  • We know that $5$ divides at most one of $x,y$ and $z$
  • If $5$ does not divide $x$ or $y$, then $x^{2}\equiv\pm 1\pmod5$ and $y^{2}\equiv\pm 1\pmod5$
  • Then $z^{2}\equiv 0,2\ \text{or}\ -2\pmod 5$
  • But $\pm 2$ is not a quadratic residue modulo $5$
  • So $z^{2}\equiv 0\pmod 5$, whence $5$ $\mid z$

My Problem:

Can someone help me out in understanding the first point of the solution? I am all thumbs.

Best Answer

Hint: What does 'primitive' mean?


So the statement we are trying to prove here is if $(x,y,z)$ is a primitive Pytagorian triple, that is to say $hcf(x,y,z)=1$ and $x^2+y^2=z^2$, then $5$ divides at most one of them.

If 5 divides all three of them then 5 divides the highest common factor of $x,y$ and $z$ and this is a contradiction.

So suppose 5 divides two of them. Then by the congruence $x^2+y^2\equiv z^2$ (mod $5$) it is clear that the third one must be divisible by $5$ also which is a contradiction. (for example if we assumed $x$ and $z$ to be divisible by $5$ then we obtain $y^2 \equiv 0$ (mod $5$)