%I #68 Feb 10 2026 16:21:25
%S 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,
%T 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,
%U 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
%N 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.
%C 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.
%C 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.
%C 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).
%C 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)).
%H Alois P. Heinz, <a href="/A392670/b392670.txt">Rows n = 1..14, flattened</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Calkin%E2%80%93Wilf_tree">Calkin-Wilf tree</a>.
%e Triangle begins:
%e k = 0 1 2 3 4 5 6 7 8 9 . . .
%e n=1: 1;
%e n=2: 1,1,2;
%e n=3: 1,1,1,3,2,2,3;
%e n=4: 1,1,1,1,4,3,3,5,2,2,2,5,3,3,4;
%e For row n=4, the Calkin-Wilf tree of 4 levels is as follows and row 4 is the numerators traversed in preorder
%e 1/1
%e / \
%e 1/2 2/1
%e / \ / \
%e 1/3 3/2 2/3 3/1
%e / \ / \ / \ / \
%e 1/4 4/3 3/5 5/2 2/5 5/3 3/4 4/1
%e Notice each left descent has numerator unchanged and those repetitions are
%e row 1,1,1,1, 4, 3,3, 5, 2,2,2, 5, 3,3, 4
%e \-----/ ^ \-/ ^ \---/ ^ \-/ ^
%e term 1 4 3 5 2 5 3 4 diatomic
%e reps 4 1 2 1 3 1 2 1 ruler
%p b:= (n, u, d)-> [u/d, `if`(n=1, [], [b(n-1, u, u+d)[], b(n-1, u+d, d)[]])[]]:
%p T:= n-> map(numer, b(n, 1$2))[]:
%p seq(T(n), n=1..6); # _Alois P. Heinz_, Jan 19 2026
%Y Cf. A002487, A001511, A046699, A392671 (denominators).
%Y Cf. A003462 (row sums).
%K nonn,tabf,look,frac
%O 1,4
%A _V. V. Muromtsev_, Jan 19 2026