Continued Fraction Tree

The Stern-Brocot tree, Calkin-Wilf tree, and convergents of irrationals

CF: [1; 1, 1, 1, 1, ...]
φ = [1; 1, 1, 1, ...] ≈ 1.6180
5
8

The Stern-Brocot tree contains every positive rational number exactly once, in lowest terms. Starting from 0/1 and 1/0 as sentinels, each node p/q has left child (p_L+p)/(q_L+q) and right child (p+p_R)/(q+q_R) (mediant). To find a number x: go left if x < current, right if x > current. The path encodes the continued fraction [a₀; a₁, a₂, ...] of x. The golden ratio φ = [1;1,1,1,...] takes the longest possible path (hardest to approximate). Click anywhere on the tree to explore that node's fraction.