OFFSET
2,4
COMMENTS
LINKS
Alois P. Heinz, Rows n = 2..150, 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.
FORMULA
G.f.: G(s,z), where s marks number of horizontal steps in the peaks and z marks semiperimeter, satisfies the equation given in the Maple program.
G.f.: G(w,z), where w marks number of horizontal steps in the peaks and z marks semiperimeter, satisfies eq. (7) of the Blecher et al. reference, where one has to set x = z and y = z.
The trivariate g.f. G = G(t,s,z), where t marks number of peaks, s marks number of horizontal steps in the peaks, and z marks semiperimeter, satisfies z*(1-z)*(1-s*z)*G^2-(1-3*z-s*z+z^2+3*s*z^2-s*z^3+t*s*z^3-t*s*z^4)*G + t*s*z^2*(1-z)^2 = 0.
EXAMPLE
Row 4 is 3,1,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1],[1,2],[2,1],[2,2],[3] and the corresponding drawings show that they have 3,1,1,2,1 horizontal steps in their peaks.
Triangle starts
1;
1,1;
3,1,1;
8,3,1,1;
21,9,3,1,1
MAPLE
eq := G = z^2*s+z*(G-z^2*s/(1-z*s)+z^2*s^2/(1-z*s))+z*G+z^2*G+z*G*(G-z^2*s/(1-z*s)+z^2/(1-z)): G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 20)): for n from 2 to 16 do P[n] := sort(expand(coeff(Gser, z, n))) end do: for n from 2 to 16 do seq(coeff(P[n], s, j), j = 1 .. n-1) 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`(max(h, t)>0, h+1, 0)))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=1..n-1))(b(n, 0$3)):
seq(T(n), n=2..16); # 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[Max[h, t] > 0, h + 1, 0]]]]]; T[n_] := Function [p, Table[Coefficient[p, z, i], {i, 1, n - 1}]][b[n, 0, 0, 0]]; Table[T[n], {n, 2, 16}] // Flatten (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Jun 01 2016
STATUS
approved