OFFSET
1,2
COMMENTS
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.
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.
LINKS
EXAMPLE
The terms together with their standard ordered trees begin:
1: o
2: (o)
3: ((o))
4: (oo)
5: (((o)))
6: ((o)o)
8: (ooo)
9: ((oo))
10: (((o))o)
11: ((o)(o))
12: ((o)oo)
16: (oooo)
17: ((((o))))
18: ((oo)o)
19: (((o))(o))
20: (((o))oo)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
srt[n_]:=If[n==1, {}, srt/@stc[n-1]];
mgnum[t_]:=If[t=={}, 1, Times@@Prime/@mgnum/@t];
fir[q_]:=Select[Range[Length[q]], !MemberQ[Take[q, #-1], q[[#]]]&];
fir[Table[mgnum[srt[n]], {n, 100}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 20 2022
STATUS
approved