Pythagorean triples have been first mentioned in the second millennium BC by Babylonians. The triple consists of three positive integers a, b and c, which are related to each other by the Pythagorean theorem a2 + b2 = c2. Thus, they represent the length of the three sides of a right Pythagorean triangle. Primitive Pythagorean triples are the triples, which are co-prime, therefore the only common positive divisor is 1.
One of the methods for generating Pythagorean triples was proposed by Leonardo of Pisa. His technique uses consequent odd integers, such as 1 and 3, then add them together in order to generate the ...