A179752 Maximum depth of parenthesizations encoded by A014486, or correspondingly, maximum height for the equivalent general trees.
0, 1, 1, 2, 1, 2, 2, 2, 3, 1, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 4, 1, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 4, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 1, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 4, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4
Offset: 0
Examples
The terms A014486[1..8] encode the following rooted plane general trees: .1.......2.......3.......4.......5.......6.......7.......8. ........................................................... .........................................................o. .........................................................|. .................o.................o...o.......o...o.....o. .................|.................|...|........\./......|. .o.....o...o.....o.....o.o.o...o...o...o...o.....o.......o. .|......\./......|......\|/.....\./.....\./......|.......|. .*.......*.......*.......*.......*.......*.......*.......*. and the corresponding parenthesizations: .().....()()....(())...()()()..()(())..(())()..(()())..((())) thus a(1)=1, a(2)=1, a(3)=2, a(4)=1, a(5)=2, a(6)=2, a(7)=2, a(8)=3.
Links
- Antti Karttunen, Table of n, a(n) for n = 0..2055
Programs
-
Mathematica
blist[m_] := Select[Map[Accumulate, Permutations[PadLeft[Table[1, m], 2*m, -1]]], Min[#] >= 0 &]; Join[{{0}}, Array[Map[Max, blist[#]] &, 6]] (* Paolo Xausa, Mar 04 2024 *)
Comments