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
Alois P. Heinz, Rows n = 2..250, flattened
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
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, May 20 2016
STATUS
approved