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.

A358579 Numbers k such that the k-th standard ordered rooted tree has the same number of leaves as internal (non-leaf) nodes.

Original entry on oeis.org

2, 6, 7, 9, 20, 22, 23, 26, 27, 29, 35, 41, 66, 76, 78, 79, 84, 86, 87, 90, 91, 93, 97, 102, 103, 106, 107, 109, 115, 117, 130, 136, 138, 139, 141, 146, 153, 163, 169, 193, 196, 197, 201, 226, 241, 262, 263, 296, 300, 302, 303, 308, 310, 311, 314, 315, 317
Offset: 1

Views

Author

Gus Wiseman, Nov 25 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 terms together with their corresponding rooted trees begin:
   2: (o)
   6: (o(o))
   7: ((oo))
   9: ((o)(o))
  20: (oo((o)))
  22: (o(((o))))
  23: (((o)(o)))
  26: (o(o(o)))
  27: ((o)(o)(o))
  29: ((o((o))))
  35: (((o))(oo))
  41: (((o(o))))
  66: (o(o)(((o))))
  76: (oo(ooo))
  78: (o(o)(o(o)))
  79: ((o(((o)))))
  84: (oo(o)(oo))
  86: (o(o(oo)))
		

Crossrefs

These ordered trees are counted by A000891.
The unordered version is A358578, counted by A185650.
Height instead of leaves: counted by A358588, unordered A358576.
Height instead of internals: counted by A358590, unordered A358577.
Standard ordered tree number statistics: A358371, A358372, A358379, A358553.
A000081 counts rooted trees, ordered A000108.
A055277 counts trees by nodes and leaves, ordered A001263.

Programs

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

Formula

A358371(a(n)) = A358553(a(n)).