Pythagorean numbers

We consider the diophantine equation

$x^2 + y^2 = z^2$   …………………………………………………….   (1)

whose connection to Pythagoras’  Theorem is obvious.

In what follows we take (a1, a2, … an) to be the greatest common divisor of the integers in the brackets.

It is clear that any positive solution a, b, c determines an infinite number of solutions ± ta, ± tb, ± tc where t is any integer, and also that 0, 0, 0 and ±a, 0, ±a and 0, ±a, ±a are solutions so we can confine our attention to cases where (x, y, z) = 1 and x, y, z > 0. We call these solutions the Pythagorean Numbers.

Proposition: the complete set of Pythagorean numbers without duplicates is:

$z = a^2 + b^2$   ;   $x = a^2 - b^2$  ;   $y = 2ab$

where a, b run through all the positive integers such that

a > b > 0 ; (a, b) = 1 and one of a and b is even, one odd.

Note: The first few such numbers are:

 a b x y z 2 1 3 4 5 3 2 5 12 13 4 1 15 8 17 4 3 7 24 25

Proof: We take as given the following Lemma: if (m, n) = 1 and p divides mn then either p divides m or p divides n. For a proof see ‘Common Factors and Linear Diophantine Equations’ accessible through ‘Notes on Numbers’ (see sidebar on the home page).

First we show that if the triplets x, y, z constructed as per the proposition are Pythagorean numbers. It is clear by substitution that they are solutions of (1). It is also clear that they are all positive. Suppose n > 1 is some common divisor of x, y and z. z = (a + b)2 – 4ab is odd so n is odd. Since n divides y =2ab, it must divide either a or b, but it cannot divide both. Thus n divides either a2 or b2 but cannot divide both. Thus n cannot divide z, a contradiction. Thus (x, y, z) = 1.

The set of triplets so constructed contains no duplicates since if y = 2a1b1 = 2a2b2 then by the lemma and the Unique Factorisation Theorem a1 = a2 and b1 = b2.

Now we show that if x, y, z is a Pythagorean triplet then it either has the form given in the Proposition, or is a duplicate

(x,y) = 1 because if n > 1 divides x and y it divides z, a contradiction. Thus x,y cannot both be even. If x is odd then x2 leaves remainder 1 on division by 4, and similarly with y, so x,y cannot both be odd. Therefore z must be odd.

Suppose x is odd. We can factor (1) as y2 = z2 – x2 = (z + x)(z – x). Clearly 2 divides both z + x and z – x. Suppose there is a larger common divisor n. Then n divides (z + x) + (z – x) = 2z and (z + x) – (z – x) = 2x, so n/2 divides both z and x, and so (n/2)2 divides z2 – x2 = y2 and (x, y, z) = n/2 > 1, a contradiction.

Consequently we can write (y/2)2 = ((z + x)/2)((z – x)/2) where ((z + x)/2,(z – x)/2) = 1. Then as a consequence of the Unique Factorisation Theorem, (z + x)/2 and (z – x)/2 must both be squares.

So we can write (z + x)/2 = a2, (z – x)/2 = b2, (a,b) = 1. Therefore z = a2 + b2, x = a2 – b2, y = 2ab. Since x > 0, a > b and since x,z are both odd, one of a and b must be even.

Likewise, if we suppose y is odd we can factor (1) as x2 = z2 – y2 = (z + y)(z – y) and show that the triplet x, y, z has the duplicate form given above.