login
A358505
Binary encoding of the n-th standard ordered rooted tree.
9
0, 2, 12, 10, 56, 50, 44, 42, 52, 226, 204, 202, 184, 178, 172, 170, 240, 210, 908, 906, 824, 818, 812, 810, 180, 738, 716, 714, 696, 690, 684, 682, 228, 962, 844, 842, 3640, 3634, 3628, 3626, 820, 3298, 3276, 3274, 3256, 3250, 3244, 3242, 752, 722, 2956, 2954
OFFSET
1,2
COMMENTS
The binary encoding of an ordered tree (A014486) is obtained by replacing the internal left and right brackets with 0's and 1's, thus forming a binary number.
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 sixth standard tree is {{{}},{}}, which becomes (1,1,0,0,1,0), so a(6) = 50.
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
srt[n_]:=If[n==1, {}, srt/@stc[n-1]];
trt[t_]:=FromDigits[Take[DeleteCases[Characters[ToString[t]]/.{"{"->1, "}"->0}, ", "|" "], {2, -2}], 2];
Table[trt[srt[n]], {n, 100}]
CROSSREFS
Sorting gives A014486.
A dual sequence is A358523.
Sequence in context: A280015 A343645 A245281 * A308215 A216478 A181060
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 20 2022
STATUS
approved