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.

A358371 Number of leaves in the n-th standard ordered rooted tree.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 4, 1, 3, 2, 3, 2, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 5, 2, 2, 3, 4, 2, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 5, 2, 4, 3, 4, 3, 4, 4, 5, 4, 4, 4, 5, 4, 5, 5, 6, 2, 3, 2, 3, 3, 4, 4, 5, 3, 3, 3, 4, 3, 4, 4, 5, 2, 4, 3, 4, 3, 4
Offset: 1

Views

Author

Gus Wiseman, Nov 13 2022

Keywords

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.

Examples

			The standard ordered rooted tree ranking begins:
  1: o        10: (((o))o)   19: (((o))(o))
  2: (o)      11: ((o)(o))   20: (((o))oo)
  3: ((o))    12: ((o)oo)    21: ((o)((o)))
  4: (oo)     13: (o((o)))   22: ((o)(o)o)
  5: (((o)))  14: (o(o)o)    23: ((o)o(o))
  6: ((o)o)   15: (oo(o))    24: ((o)ooo)
  7: (o(o))   16: (oooo)     25: (o(oo))
  8: (ooo)    17: ((((o))))  26: (o((o))o)
  9: ((oo))   18: ((oo)o)    27: (o(o)(o))
For example, the 25th ordered tree is (o,(o,o)) because the 24th composition is (1,4) and the 3rd composition is (1,1). Hence a(25) = 3.
		

Crossrefs

The triangle counting trees by this statistic is A001263, unordered A055277.
The version for unordered trees is A109129, nodes A061775, edges A196050.
The nodes are counted by A358372.
A000081 counts unordered rooted trees, ranked by A358378.
A000108 counts ordered rooted trees.
A358374 ranks ordered identity trees, counted by A032027.
A358375 ranks ordered binary trees, counted by A126120

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    srt[n_]:=If[n==1,{},srt/@stc[n-1]];
    Table[Count[srt[n],{},{0,Infinity}],{n,100}]