Tree of primitive Pythagorean triples
A tree of primitive Pythagorean triples is a mathematical tree in which each node represents a primitive Pythagorean triple and each primitive Pythagorean triple is represented by exactly one node. In two of these trees, Berggren's tree and Price's tree, the root of the tree is the triple (3, 4, 5), and each node has exactly three children, generated from it by linear transformations.
A Pythagorean triple is a set of three positive integers a, b, and c having the property that they can be respectively the two legs and the hypotenuse of a right triangle, thus satisfying the equation ; the triple is said to be primitive if and only if the greatest common divisor of a, b, and c is one. With primitive Pythagorean triples, a, b, and c are also pairwise coprime. The set of all primitive Pythagorean triples has the structure of a rooted tree, specifically a ternary tree, in a natural way. This was first discovered by B. Berggren in 1934.
F. J. M. Barning showed that when any of the three matrices
is multiplied on the right by a column vector whose components form a Pythagorean triple, then the result is another column vector whose components are a different Pythagorean triple. If the initial triple is primitive, then so is the one that results. Thus each primitive Pythagorean triple has three "children". All primitive Pythagorean triples are descended in this way from the triple (3, 4, 5), and no primitive triple appears more than once. The result may be graphically represented as an infinite ternary tree with (3, 4, 5) at the root node (see classic tree at right). This tree also appeared in papers of A. Hall in 1970 and A. R. Kanga in 1990. In 2008 V. E. Firstov showed generally that only three such trichotomy trees exist and give explicitly a tree similar to Berggren's but starting with initial node (4, 3, 5).