%I #19 Mar 05 2024 05:10:21
%S 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,
%T 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,
%U 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
%N Maximum depth of parenthesizations encoded by A014486, or correspondingly, maximum height for the equivalent general trees.
%C Each integer n appears first at position given by A014138.
%H Antti Karttunen, <a href="/A179752/b179752.txt">Table of n, a(n) for n = 0..2055</a>
%e The terms A014486[1..8] encode the following rooted plane general trees:
%e .1.......2.......3.......4.......5.......6.......7.......8.
%e ...........................................................
%e .........................................................o.
%e .........................................................|.
%e .................o.................o...o.......o...o.....o.
%e .................|.................|...|........\./......|.
%e .o.....o...o.....o.....o.o.o...o...o...o...o.....o.......o.
%e .|......\./......|......\|/.....\./.....\./......|.......|.
%e .*.......*.......*.......*.......*.......*.......*.......*.
%e and the corresponding parenthesizations:
%e .().....()()....(())...()()()..()(())..(())()..(()())..((()))
%e 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.
%t 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 *)
%Y Cf. A179751, A126303, A126304, A080237, A085197.
%K nonn,base
%O 0,4
%A _Antti Karttunen_, Aug 03 2010
|