No primitive pythagorean triple $(x,y,z)$ with $z\equiv -1 \pmod 4$

460 Views Asked by At

Show that there are no primitive pythagorean triple $(x,y,z)$ with $z\equiv -1 \pmod 4$.

I once have proven that, for all integers $a,b$, we have that $a^2 + b^2$ is congruent to $0$, or $1$, or $2$ modulo $4$. I feel like it is enough to conclude it by considering $a=x$, $b=y$ and $\gcd(x,y)=1$. But I am not completely sure if it is the way the proof should end.

2

There are 2 best solutions below

2
On

If you have proven for all integers $a, b$ this property holds, then yes it follows immediately that it holds for the subset of those integer pairs for which $\gcd(a,b) = 1$.

0
On

Primitive Pythagorean triples can be exhaustively generated using the relationships $x=m^2-n^2, y=2mn, z=m^2+n^2$ for positive integers $m>n,gcd(m,n=1),m\not\equiv n\mod{2}$. You can check this out by substituting those relationships in the Pythagorean formula $x^2+y^2=z^2$ and seeing that they add up correctly.

The modularity condition means that one of $(m,n)$ is odd and the other is even. Wlog let $m$ be even and $n$ be odd. Then $m^2\equiv 0\mod{4}$ and $n^2\equiv 1\mod{4}$. Hence $m^2+n^2\equiv 1\mod{4}$; or $m^2+n^2(=z)\not\equiv -1\mod{4}$.