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
1, 2, 5, 13, 34, 1, 89, 8, 233, 42, 610, 183, 1, 1597, 717, 13, 4181, 2622, 102, 10946, 9134, 624, 1, 28657, 30691, 3275, 19, 75025, 100284, 15473, 205, 196418, 320466, 67684, 1650, 1, 514229, 1005630, 279106, 11020, 26, 1346269, 3108324, 1098402, 64553, 366, 3524578, 9485551, 4161750, 342867, 3716, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,2
COMMENTS
Sum of entries in row n = A082582(n).
Diagonal sums (obtained by fixing n - k) give the Catalan numbers [Deutsch and Elizalde]. - Eric M. Schmidt, Nov 01 2017
LINKS
A. Blecher, C. Brennan, and A. Knopfmacher, Peaks in bargraphs, Trans. Royal Soc. South Africa, 71, No. 1, 2016, 97-103.
M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
Emeric Deutsch and Sergi Elizalde, A bijection between bargraphs and Dyck paths, arXiv:1705.05984 [math.CO], 2017.
FORMULA
Sum_{k>1} k*T(n,k) = A271941(n).
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).
EXAMPLE
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.
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.
Table begins:
1
2
5
13
34 1
89 8
233 42
610 183 1
1597 717 13
4181 2622 102
10946 9134 624 1
MAPLE
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
# second Maple program:
b:= proc(n, y, t, h) option remember; expand(
`if`(n=0, (1-t)*z^h, `if`(t<0, 0, b(n-1, y+1, 1, 0))+
`if`(t>0 or 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)))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=1..degree(p)))(b(n, 0$3)):
seq(T(n), n=2..20); # Alois P. Heinz, Jun 06 2016
MATHEMATICA
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 *)
CROSSREFS
Sequence in context: A148288 A320813 A278134 * A273721 A112841 A104589
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, May 20 2016
STATUS
approved

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 July 12 15:15 EDT 2024. Contains 374251 sequences. (Running on oeis4.)