Let

be a PPT, that is,

,

, and

are positive integers such that

with

. A primitive right triangle has side lengths that form a PPT.

There are two ways to represent a particular PPT, by

or

}. The corresponding primitive right triangles are inversely similar.

Each PPT can be represented by a unique base-3 number, called the PPT's ID number. The three children of a PPT have ID numbers formed by appending 0, 1, or 2 to the ID number of the PPT. The parent of a PPT has an ID number formed by dropping the last digit of the PPT's ID number.

The Demonstration shows three levels of the PPT tree from a parent: the parent, three children, and nine grandchildren.

PPTs ordered in this manner form a pair of infinite ternary trees that are

rooted and

ordered. The two roots are

and

. The root of the tree to which any PPT belongs is identified by the first digit of its ID number. Only one tree is needed if inverse symmetry is ignored.

If

is a child of the PPT

,

,

, and

', this can be used to prove completeness, that is, that all PPTs are in the tree.

Suppose the ID number of a PPT is

. Then the ID number for the inversely similar PPT is found by switching 1 and 2 in

. For example, {975, 448, 1073} and {448, 975, 1073} have ID numbers 11201 and 22102.

[1] A. Hall, "Genealogy of Pythagorean Triads,"

*Mathematical Gazette*,

**LIV**(390), 1970 pp. 377–379.