login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A271940 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k peaks (n >= 2, k >= 1). 2

%I #29 Nov 02 2017 15:44:57

%S 1,2,5,13,34,1,89,8,233,42,610,183,1,1597,717,13,4181,2622,102,10946,

%T 9134,624,1,28657,30691,3275,19,75025,100284,15473,205,196418,320466,

%U 67684,1650,1,514229,1005630,279106,11020,26,1346269,3108324,1098402,64553,366,3524578,9485551,4161750,342867,3716,1

%N Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k peaks (n >= 2, k >= 1).

%C Sum of entries in row n = A082582(n).

%C Diagonal sums (obtained by fixing n - k) give the Catalan numbers [Deutsch and Elizalde]. - _Eric M. Schmidt_, Nov 01 2017

%H Alois P. Heinz, <a href="/A271940/b271940.txt">Rows n = 2..250, flattened</a>

%H A. Blecher, C. Brennan, and A. Knopfmacher, <a href="http://dx.doi.org/10.1080/0035919X.2015.1059905">Peaks in bargraphs</a>, Trans. Royal Soc. South Africa, 71, No. 1, 2016, 97-103.

%H M. Bousquet-Mélou and A. Rechnitzer, <a href="http://dx.doi.org/10.1016/S0196-8858(02)00553-5">The site-perimeter of bargraphs</a>, Adv. in Appl. Math. 31 (2003), 86-112.

%H Emeric Deutsch and Sergi Elizalde, <a href="https://arxiv.org/abs/1705.05984">A bijection between bargraphs and Dyck paths</a>, arXiv:1705.05984 [math.CO], 2017.

%F Sum_{k>1} k*T(n,k) = A271941(n).

%F G.f.: (-b + sqrt(b^2 - 4tz^3(z - 1)^2))/(2z(z - 1)), where b = 1 - 3z + z^2 + tz^3 (in eq. (5) of the Blecher et al. reference set x = z, y = z, w = t).

%e Row 4 is 5 because all 5 bargraphs of semiperimeter 4 (corresponding to the compositions [1,1,1], [1,2], [2,1], [2,2], [3]) have only 1 peak.

%e T(6,2) = 1 because among the A082582(6)=35 bargraphs of semiperimeter 6 only the one corresponding to the composition [2,1,2] has 2 peaks.

%e Table begins:

%e 1

%e 2

%e 5

%e 13

%e 34 1

%e 89 8

%e 233 42

%e 610 183 1

%e 1597 717 13

%e 4181 2622 102

%e 10946 9134 624 1

%p b := 1-3*z+z^2+t*z^3: G := ((-b+sqrt(b^2-4*t*z^3*(z-1)^2))*(1/2))/(z*(z-1)): Gser := simplify(series(G, z = 0, 23)): for n from 2 to 20 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 2 to 20 do seq(coeff(P[n], t, j), j = 1 .. degree(P[n])) end do; # yields sequence in triangular form

%p # second Maple program:

%p b:= proc(n, y, t, h) option remember; expand(

%p `if`(n=0, (1-t)*z^h, `if`(t<0, 0, b(n-1, y+1, 1, 0))+

%p `if`(t>0 or y<2, 0, b(n, y-1, -1, 0)*z^h)+

%p `if`(y<1, 0, b(n-1, y, 0, `if`(t>0, 1, h)))))

%p end:

%p T:= n-> (p-> seq(coeff(p, z, i), i=1..degree(p)))(b(n, 0$3)):

%p seq(T(n), n=2..20); # _Alois P. Heinz_, Jun 06 2016

%t b[n_, y_, t_, h_] := b[n, y, t, h] = Expand[If[n == 0, (1 - t)*z^h, If[t < 0, 0, b[n - 1, y + 1, 1, 0]] + If[t > 0 || y < 2, 0, b[n, y - 1, -1, 0]*z^h] + If[y < 1, 0, b[n - 1, y, 0, If[t > 0, 1, h]]]]]; T[n_] := Function [p, Table[Coefficient[p, z, i], {i, 1, Exponent[p, z]}]][b[n, 0, 0, 0]]; Table[T[n], {n, 2, 20}] // Flatten (* _Jean-François Alcover_, Nov 29 2016 after _Alois P. Heinz_ *)

%Y Cf. A082582, A271941.

%K nonn,tabf

%O 2,2

%A _Emeric Deutsch_, May 20 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 11:27 EDT 2024. Contains 371913 sequences. (Running on oeis4.)