Pythagorean Triples
Which triples of whole numbers {a, b, c} satisfy
a2 + b2 = c2 ?
Such triples are called Pythagorean triples. You probably know {3, 4, 5} and {5, 12, 13}. But can you classify all possible Pythagorean triples?
Answer: it is possible to prove that all Pythagorean triples are of the form
{ M2-N2, 2MN, M2+N2 }
for some integers M and N, or they are multiples of this form.
Thus setting M=2,N=1 gives {3,4,5} and M=3,N=2 gives {5,12,13}.
To generate one specific type of Pythagorean triples, you can follow
the following algorithm. It gives a triple where the
hypotenuse and the longer leg differ by 1.
Here are some examples:
|