OFFSET
1,3
COMMENTS
We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.
EXAMPLE
The 89-th standard rooted tree is ((o)o(oo)), and it has 3 internal nodes, so a(89) = 3.
MATHEMATICA
stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]];
srt[n_]:=If[n==1, {}, srt/@stc[n-1]];
Table[Count[srt[n], _[__], {0, Infinity}], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 26 2022
STATUS
approved