cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A358505 Binary encoding of the n-th standard ordered rooted tree.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 20 2022

Keywords

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.

Examples

			The sixth standard tree is {{{}},{}}, which becomes (1,1,0,0,1,0), so a(6) = 50.
		

Crossrefs

Sorting gives A014486.
A dual sequence is A358523.

Programs

  • 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}]