A358379 Edge-height (or depth) of the n-th standard ordered rooted tree.
0, 1, 2, 1, 3, 2, 2, 1, 2, 3, 2, 2, 3, 2, 2, 1, 4, 2, 3, 3, 3, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 1, 3, 4, 2, 2, 3, 3, 3, 3, 2, 3, 2, 2, 3, 2, 2, 2, 4, 2, 3, 3, 3, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 1, 3, 3, 4, 4, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 2, 3, 3, 3, 2, 2
Offset: 1
Keywords
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 52nd ordered tree is (o((o))oo) so a(52) = 3.
Links
Crossrefs
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[Depth[srt[n]]-2,{n,100}]
Comments