We are all familiar with Pythagoras’ Theorem: that if a triangle with sides of length a, b, and c is right-angled, then a2 + b2 = c2. (You can find a proof of the theorem in an earlier blog here). If the sides all have integer values, then the numbers a, b, c form a “Pythagorean triple” – the simplest of which is 3, 4, 5 since 32 + 42 = 52. Further triples can be formed by simple multiplication: thus, 6, 8, 10 will be a triple since the underlying triangle is simply an enlargement ×2 of a 3, 4, 5 triangle. But it also turns out that writing a as any odd number will create a triple: let’s look at the pattern.
Clearly c = b + 1, but how can we calculate b? In the first row, 4 = 3 × 1 + 1; in the second row, 12 = 5 × 2 + 2; so, in general, in the nth row, b = a × n + n. And since the first column is the sequence of odd numbers, the value of a in row n is 2n + 1. Now we need to do a bit of algebra:
Using the information in the previous paragraph, we can see that the triple in row n will be:
a = 2n + 1
b = a × n + n = (2n + 1)n + n = 2n2 + 2n = 2n(n + 1)
c = b + 1 = 2n2 + 2n + 1
Thus the next triple in the table will be formed from n = 5, giving 11, 60, 61. I shall leave it as an exercise for the reader to prove that a2 + b2 = c2 for any value of n!
Another approach comes down to us from Diophantus of Alexandria, who lived in the 3rd century AD. He showed that for any integers p and q, the three numbers
a = 2pq, b = q2 – p2, c = q2 + p2
form a Pythagorean triple. For example, if we substitute p = 1, q = 5, we get the triple 10, 24, 26 which is 5, 12, 13 multiplied by 2.
The approach in the previous section will yield all possible Pythagorean triples, but they won’t necessarily be “primitive”. A triple such 6, 8, 10 is not primitive since it is just a multiple of 3, 4, 5. It would be simple to conclude from the table above that all primitive triples are created by starting with any odd number – certainly these will always be primitive, but there are others too. After 11, 60, 61, for example, the next triple is 12, 35, 37, and after 19, 180, 181 we get 20, 99, 101. We could theorise from these examples that if a is even, then c – b = 2. It certainly looks like it – but then we get the triples 20, 21, 29 and 36, 77, 85. All of which goes to show that you can never deduce a general theorem from a few examples!