[zimaths

Pythagorean Triples

by D.G.Townshend and J.P.G.Ewer


Introduction

As everybody knows, the numbers 3, 4 and 5 form the sides of a right-angled triangle. This is because (using the converse of Pythagoras' theorem)

32 + 42 = 52.
Slightly less well-known is the triple 5, 12 and 13. Again the numbers here form the sides of a right-angled triangle, since 52 + 122 = 132. It is an interesting problem then to find all triples of positive integers A, B, C that satisfy the Pythagorean rule

A2 + B2 = C2.
(1)
Here of course, A and B may be thought of as two sides of a right-angled triangle with hypoteneuse C. Attempts to find solutions, and to find a formula which will generate ALL solutions, date back thousands of years. The ancient Babylonians certainly had the formula, for they recorded some systematic tables involving huge triples on clay tablets, which have been unearthed and deciphered this century. (See a transcription at the end of this article.) The mathematics involved is elementary and involves only basic algebra.

Any set of three (positive) integers satisfying (1) is called a Pythagorean triple . Note that if {a,b,c} is a Pythagorian triple, then so is {ka,kb,kc}, for any positive integer k. We are thus interested only in sets which have no common factor (other then 1). Such triples are called relatively prime, which we shall abbreviate to RP. In what follows all variables a, b, m, n, k, etc. are positive integers and A, B and C will always denote an RP triple satisfying (1). The word ``factor'' will always mean a non-trivial factor (that is not 1 or the number itself.)

First we note that if C is even, then A and B must be both even or both odd (since the square of an even number is even and the square of an odd number is odd). If both are even, the triple is not RP, so both must be odd. Let  A = 2m+1 and B = 2n+1.

Then

A2+B2 = 2(2m2+2n2+2m+2n+1).
Thus C is such that

C2 = 2(2k+1)
for some integer k. However, if C2 has only one even factor, it cannot be a perfect square. This shows that C cannot be even, so it is odd. In that case one of A and B must be even, and one odd. We have proved the following result.

C is odd and   A,  B have opposite parity (i.e. one is odd, the other even).

Now suppose that A, B and C are RP, but that A and B have a non-trivial common factor, say  A = ak  and   B = bk  for some k > 1. Then

C2 = k2(a2+b2)
so that C also has a factor k. This would mean that A, B, and C are not RP. Hence A and B must be RP. In the same way it may be shown that A and C are RP and also that B and C are RP. We have proved the following result.

No pair of  A,  B  and  C has a common factor.

Increasing by 1

Many students will be familiar with the triples

{3,4,5} ; {5,12,13} ; {7,24,25}
(2)

and others in which the hypotenuse is 1 greater than one of the other sides. It is possible that such students have discovered some rule for generating these triples for themselves. Let us see how this may be done. Suppose then that

A = x and C = x + 1.
It follows that

B2 = (x+1)2-x2 = 2x+1.
Since 2x+1 is a perfect square, set

2x+1 = (2n+1)2 = 4n2+4n+1.
Then

x
=
2n2+2n.
Hence

A = 2n2+2n , B = 2n+1 and C = 2n2+2n+1.
Setting n = 1,  2  and  3  generates the well-known triples in (2). We shall call triples generated in this way ``Set 1''.

Increasing by 2

Having looked at triples where the hypotenuse is 1 greater than one of the sides, it is natural to consider the case where hypotenuse is 2 greater then one of the sides. Let B = x and C = x + 2.

Note that since x + 2 is odd (by Theorem 1), then x is odd. Thus

A2 = (x+2)2-x2 = 4x+4 = 4(x+1).
Then x+1 is a perfect square and is even by the remarks above. Hence

x+1 = 4n2
for some n. So

A2 = 16n2
It follows that

A = 4n , B = 4n2 - 1 and C = 4n2+1.
For example with n = 1 and 2 we obtain respectively 

{3,4,5} and {8,15,17}. We shall call triples generated in this way ``Set 2''.

Increasing by l

We may now ask the question, ``What happens when C is greater then one of the sides by a number greater then 2?'' Suppose 

A = x and C = x + l,  where l > 2. Then

B2 = 2xl+l2 = l(2x+l).
Now clearly l is a factor of B. There are then two possibilities.

1.  l is not a perfect square.

2.  l is a perfect square.

In the first case it must be that l is also a factor of (2x+l) (since B2 is a perfect square). Since l is not equal to 1 or 2, then l is a factor of x and hence also of A. This means that it is a factor of A and B, which is impossible, since A and B are RP by Theorem 2.

We are reduced to the second possibility, that l is a perfect square. Let us write l = k2.

Increasing by k2

In view of the above let us now set  

A = x and C = x + k2. Then

B2 = 2x2+k4 = k2(2x+k2).

The factor 2x+k2 must be a perfect square. If k were even it would then follow that x was even and hence C would also be even, contradicting Theorem 1. Thus k must be odd. It follows that B is odd and A is even.

Since k is odd, we can find an integer n such that  

2x+k2 = (2n+k)2. Hence

Table>
2x = 4n2+4nk  so  x = 2n2+2nk,
yielding

A = 2n2+2nk,  B = 2nk+k2,  C = 2n2+2nk+k2.
Let us call this set of triples ``Set 3''.

Remarks

1.  If k = 1 then Set 3 reduces to Set 1.

2.  If k = 2 then Set 3 reduces to Set 2.

3.  n and k are RP if and only if all triples in set 3 are RP.

4.  We have

C
=
2n2+2nk+k2 = n2+(n+k)2,
A
=
2n2+2nk = 2n(n+k),
B
=
(n+k)2-n2.

Now let n+k = m. Thus A = 2mn and B = m2-n2. Since A is even, B must be odd, and hence m and n cannot both be odd or both be even. We have shown the following result, which completes the solution of the original problem.

The complete set of solutions to (1) is given by

C = m2+n2 , A = 2mn , B = m2-n2
where m and n are RP, exactly one of them is even, and m > n.

The table on the left below gives some triples generated in this way.

m
n
A
B
C
    
m
n
B
C
2
1
4
3
5
    
22·3
5
119
169
                
3
2
12
5
13
    
26
33
3367
4825
                
4
1
8
15
17
    
3·52
25
4601
6649
                
4
3
24
7
25
    
53
2·33
12709
18541
                
5
2
20
21
29
    
32
22
65
97
                  
5
4
40
9
41
    
22·5
32
319
481
                  
6
1
12
35
37
    
2·33
52
2291
3541
                
6
5
60
11
61
    
25
3·5
799
1249
                  
7
2
28
45
53
    
52
22·3
481
769
                 
7
4
56
33
65
    
34
23·5
4961
8161
                
7
6
84
13
85
    
 ? 
 ? 
45
75
                
8
1
16
63
65
    
24·3
52
1679
2929
                
8
3
48
55
73
    
3·5
23
161
289
                
8
5
80
39
89
    
2·52
33
1771
3229
                
8
7
112
15
113
    
32
5
56
106

The authors are lecturers at the National University of Science and Technology, Bulawayo, Zimbabwe.



File translated from TEX by TTH, version 1.50.


Back to Zimaths issue 2.3