number trees

Interactive explorations of hidden structure in numbers. Integers encode trees. Trees enumerate rationals. Rationals tile hyperbolic space. Same patterns, different lenses.

Trees Hidden in Integers

Every natural number encodes a unique rooted tree. This is Matula's bijection: 1 maps to a single node, primes extend depth, composites add children. These visualizations explore what this structure reveals about number theory.

The Geometry of Rationals

Binary trees enumerate all positive rationals. The same tree appears as Stern-Brocot mediants, Calkin-Wilf iteration, and continued fraction paths. Ford circles visualize this structure as tangent circles. At the deepest level, it's all hyperbolic geometry: Ford circles are horocycles, the modular group acts by isometries, and the pattern tiles the Poincaré half-plane.

The Unifying Thread

Stern-Brocot Calkin-Wilf Continued Fractions Ford Circles Hyperbolic Plane Bruhat-Tits

These aren't separate topics. They're different views of the same mathematical object: the structure of rational numbers under mediant operations, encoded by the modular group.