Interactive explorations of hidden structure in numbers. Integers encode trees. Trees enumerate rationals. Rationals tile hyperbolic space. Same patterns, different lenses.
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 core visualization. Enter any number to see its tree structure. Explore the gallery of primes, powers of 2, primorials, and highly composite numbers. See how factorization becomes geometry.
Start hereSee many trees at once. Watch patterns emerge as you scan through ranges of numbers.
OverviewWhat happens when you add or multiply numbers? Watch their trees combine.
OperationsDefine distance between numbers via their tree structure. Multiplicative geometry of integers.
MetricTrace paths through the tree. Every prime creates a unique trail.
TraversalDivisibility creates partial order. See how tree structure reflects divisor relationships.
StructureThe Möbius function μ(n) oscillates wildly. Watch the Mertens function accumulate cancellations.
AnalyticBinary 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.
Every positive rational appears exactly once. Binary paths encode continued fractions. The same tree as Stern-Brocot, different labeling.
EnumerationA continuous, strictly increasing function that maps rationals to dyadics. Turns arithmetic structure into fractal geometry.
FunctionEvery rational p/q gets a circle of radius 1/(2q²). Two circles are tangent iff the rationals are Farey neighbors. Geometry from arithmetic.
VisualizationThe unifying perspective. Ford circles are horocycles in the Poincaré half-plane. The modular group PSL(2,ℤ) tiles hyperbolic space with copies of a fundamental domain. Number theory and non-Euclidean geometry are the same subject.
Deep connectionWhy hyperbolic? When p-gons meet 3 at a vertex, p=6 gives flat space. Below: spherical. Above: hyperbolic. Watch curvature emerge from angle arithmetic.
AnimatedThe p-adic analog of the hyperbolic plane is a tree. Hecke operators become random walks: average over all neighbors. Watch the walk or see eigenfunctions.
p-adicThese 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.