Maths WorkshopMaths problems with full solutions
Exercise 1656Number theory › Divisibility and gcdOlympiadAdded 3 Nov 2026

Primitive Pythagorean triples

#Pythagorean triples#coprime#parity

Statement

Show that in any primitive Pythagorean triple (a,b,c)(a,b,c) with a2+b2=c2a^2+b^2=c^2 and gcd⁡(a,b,c)=1\gcd(a,b,c)=1, exactly one of a,ba,b is even, and cc is odd.

Hint

Parity analysis modulo 44: squares mod 44 are 00 or 11.

Show solutionHide solution

Solution

Both odd? If a,ba,b both odd, a2+b2≡1+1≡2(mod4)a^2+b^2\equiv1+1\equiv2\pmod4. But c2≡0c^2\equiv0 or 1(mod4)1\pmod4. Contradiction.

Both even? Then gcd⁡(a,b)≥2\gcd(a,b)\ge2, contradicting primitivity.

Exactly one even. So exactly one is even; WLOG aa even. Then a2≡0(mod4)a^2\equiv0\pmod4, b2≡1(mod4)b^2\equiv1\pmod4, so c2≡1(mod4)c^2\equiv1\pmod4, cc odd.

Conclusion. In any primitive triple, exactly one leg is even and the hypotenuse is odd.

Parametrization. a=2mna=2mn, b=m2−n2b=m^2-n^2, c=m2+n2c=m^2+n^2 with m>nm>n, coprime, opposite parity.