A358553 Number of internal (non-leaf) nodes in the n-th standard ordered rooted tree.
0, 1, 2, 1, 3, 2, 2, 1, 2, 3, 3, 2, 3, 2, 2, 1, 4, 2, 4, 3, 4, 3, 3, 2, 2, 3, 3, 2, 3, 2, 2, 1, 3, 4, 3, 2, 5, 4, 4, 3, 3, 4, 4, 3, 4, 3, 3, 2, 4, 2, 4, 3, 4, 3, 3, 2, 2, 3, 3, 2, 3, 2, 2, 1, 3, 3, 5, 4, 4, 3, 3, 2, 4, 5, 5, 4, 5, 4, 4, 3, 5, 3, 5, 4, 5, 4, 4
Offset: 1
Keywords
Examples
The 89-th standard rooted tree is ((o)o(oo)), and it has 3 internal nodes, so a(89) = 3.
Crossrefs
Programs
-
Mathematica
stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]]; srt[n_]:=If[n==1,{},srt/@stc[n-1]]; Table[Count[srt[n],[_],{0,Infinity}],{n,100}]
Comments