Pythagorean triples

(note by Roberto Bigoni)

Pythagorean triples


A Pythagorean triple is a sequence of three natural numbers a, b and c such that a2+b2=c2.

If a and b are relatively prime to each other (or coprime), that is, if they have no common divisors, the triple is said primitive.

The applet on this page allows you to generate the primitive Pythagorean triples formed by three numbers all included in a given range.

The extremes of this range can be as large as you like, but if these extremes are very large or very far from each other, the computation time can become intolerable or the number of triples can become very large.

The maximum number of computable triples is set by default to 10 and this number can also be changed at will.

The primitive triples formed by numbers all included between a minimum m and a maximum M are identified taking into account the following property:

each pair of natural numbers h e k, not both even or both odd, with h>k, generates a primitive Pythagorean triple (a, b, c) with




we have

If, for example, m=25 and M=100, the primitive Pythagorean triples can be obtained by this graph


by considering the pairs (h,k) corresponding to the red highlighted points in the curvilinear triangle ABC.

last revision: January 2016