Calkin-Wilf Tree

The Calkin-Wilf tree enumerates every positive rational exactly once. Starting from 1/1, each node p/q has children p/(p+q) (left) and (p+q)/q (right). The Stern-Brocot tree gives an alternative — both use the mediant, but arranged differently.

4
Click a node to explore. The Calkin-Wilf sequence (BFS): 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1, ...
Every positive rational appears exactly once. The sequence b(n) satisfies: b(0)=1, b(2n)=b(n), b(2n+1)=b(n)+b(n+1).