OFFSET
1,1
COMMENTS
Construct a tree of rational numbers by starting with a root labeled 1/2. Then iteratively add children to each node breadth-first as follows: to the node labeled p/q in lowest terms, add children labeled with any of p/(q+1) and (p+1)/q (in that order) that are less than one and have not already appeared in the tree. Then a(n) is the denominator of the n-th rational number (in lowest terms) added to the tree.
This construction is similar to the Farey tree except that the children of p/q are its mediants with 0/1 and 1/0 (if those mediants have not already occurred), rather than its mediants with its nearest neighbors among its ancestors.
For a proof that the tree described above includes all rational numbers between 0 and 1, see Gordon and Whitney.
LINKS
Glen Whitney, Table of n, a(n) for n = 1..10052
G. Gordon and G. Whitney, The Playground Problem 367, Math Horizons, Vol. 26 No. 1 (2018), 32-33.
EXAMPLE
To build the tree, 1/2 only has child 1/3, since 2/2 = 1 is outside of (0,1). Then 1/3 has children 1/4 and 2/3. In turn, 1/4 only has child 1/5 because 2/4 = 1/2 has already occurred, and 2/3 has no children because 2/4 has already occurred and 3/3 is too large. Thus, the sequence begins 2, 3, 4, 3, 5, ... (the denominators of 1/2, 1/3, 1/4, 2/3, 1/5, ...).
PROG
(Python) # See the entry for A360564.
CROSSREFS
KEYWORD
AUTHOR
Glen Whitney, Feb 11 2023
STATUS
approved