Calkin–Wilf tree
In number theory, the
Calkin–Wilf tree is a tree in which the vertices correspond 1-for-1 to the positive rational numbers. The tree is rooted at the number 1, and any rational number expressed in simplest terms as the fraction
a/
b has as its two children the numbers
a/ and /
b. Every positive rational number appears exactly once in the tree. The sequence of rational numbers in a breadth-first traversal of the Calkin–Wilf tree is known as the
Calkin–Wilf sequence. Its sequence of numerators is
Stern's diatomic series, and can be computed by the
fusc function. The Calkin–Wilf tree is named after Neil Calkin and Herbert Wilf, whose 2000 paper introduced it. Stern's diatomic series was formulated much earlier by Moritz Abraham Stern, a 19th-century German mathematician who also invented the closely related Stern–Brocot tree.