login
A392670
Triangle read by rows where row n is the numerators of the node values in a preorder traversal of the Calkin-Wilf tree with n levels, columns 0 <= k < 2^n-1.
2
1, 1, 1, 2, 1, 1, 1, 3, 2, 2, 3, 1, 1, 1, 1, 4, 3, 3, 5, 2, 2, 2, 5, 3, 3, 4, 1, 1, 1, 1, 1, 5, 4, 4, 7, 3, 3, 3, 8, 5, 5, 7, 2, 2, 2, 2, 7, 5, 5, 8, 3, 3, 3, 7, 4, 4, 5, 1, 1, 1, 1, 1, 1, 6, 5, 5, 9, 4, 4, 4, 11, 7, 7, 10, 3, 3, 3, 3, 11, 8, 8, 13, 5, 5, 5, 12, 7, 7, 9, 2, 2, 2, 2, 2, 9, 7, 7, 12, 5, 5, 5, 13, 8, 8, 11, 3, 3, 3, 3, 10, 7, 7, 11, 4, 4, 4, 9, 5, 5, 6
OFFSET
1,4
COMMENTS
The Calkin-Wilf tree read breadth-first is fractions d(i)/d(i+1) where d(i) = A002487(i) is Stern's diatomic sequence, and here the n levels are read preorder.
Triangle row n comprises repetitions of the numerators in the bottom-most level (level n) of its tree since a left child has the same numerator as its parent.
This bottom-most level is Stern diatomic terms d(i) for 2^(n-1) <= i < 2^n, and the number of repetitions is the number of consecutive left children which is the ruler function A001511(i).
Consequently the whole sequence is the diatomic sequence with terms repeated ruler function many times, and so with flat indexing a(n) = A002487(A046699(n+1)).
LINKS
Wikipedia, Calkin-Wilf tree.
EXAMPLE
Triangle begins:
k = 0 1 2 3 4 5 6 7 8 9 . . .
n=1: 1;
n=2: 1,1,2;
n=3: 1,1,1,3,2,2,3;
n=4: 1,1,1,1,4,3,3,5,2,2,2,5,3,3,4;
For row n=4, the Calkin-Wilf tree of 4 levels is as follows and row 4 is the numerators traversed in preorder
1/1
/ \
1/2 2/1
/ \ / \
1/3 3/2 2/3 3/1
/ \ / \ / \ / \
1/4 4/3 3/5 5/2 2/5 5/3 3/4 4/1
Notice each left descent has numerator unchanged and those repetitions are
row 1,1,1,1, 4, 3,3, 5, 2,2,2, 5, 3,3, 4
\-----/ ^ \-/ ^ \---/ ^ \-/ ^
term 1 4 3 5 2 5 3 4 diatomic
reps 4 1 2 1 3 1 2 1 ruler
MAPLE
b:= (n, u, d)-> [u/d, `if`(n=1, [], [b(n-1, u, u+d)[], b(n-1, u+d, d)[]])[]]:
T:= n-> map(numer, b(n, 1$2))[]:
seq(T(n), n=1..6); # Alois P. Heinz, Jan 19 2026
CROSSREFS
Cf. A002487, A001511, A046699, A392671 (denominators).
Cf. A003462 (row sums).
Sequence in context: A292869 A106348 A161092 * A029332 A358172 A344058
KEYWORD
nonn,tabf,look,frac
AUTHOR
V. V. Muromtsev, Jan 19 2026
STATUS
approved