Three integers a, b, and c that satisfy a2 + b2 = c2 are called Pythagorean Triples. There are infinitely many such numbers and there also exists a way to generate all the triples. Let n and m be integers, n*m. Then define(*) a = n2 - m2, b = 2nm, c = n2 + m2.
The three number a, b, and c always form a Pythagorean triple. The proof is simple: (n2 - m2)2 + (2mn)2 = n4 - 2n2m2 + m4 + 4n2m2 = n4 + 2n2m2 + m4 = (n2 + m2)2. The formulas were known to Euclid and used by Diophantus to obtain Pythagorean triples with special properties. However, he never raised the question whether in this way one can obtain all possible triples.The fact is that for m and n coprime of different parities, (*) yields coprime numbers a, b, and c. Conversely, all coprime triples can indeed be obtained in this manner. All others are multiples of coprime triples: ka, kb, kc.As an aside, those who mastered the arithmetic of complex numbers might have noticed that (m + in)2 = (n2 -...