OFFSET
2,7
COMMENTS
LINKS
M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
Emeric Deutsch, S Elizalde, Statistics on bargraphs viewed as cornerless Motzkin paths, arXiv preprint arXiv:1609.00088, 2016
FORMULA
G.f.: G = G(t,z) satisfies aG^2 + bG + c = 0, where a = z(1+tz^2), b = tz^3 + z^2 + z^3 + tz^4 - tz^2 + tz + z - 1, c = z^2*(tz^2 + z - tz + t).
The trivariate g.f. G(t,s,z), where t (s) marks number of odd-length (even-length) columns and z marks semiperimeter, satisfies AG^2 + BG + C = 0, where A = z(tsz^2 - tsz + tz +s), B = tsz^4+(t+s)z^3+(1-ts)z^2+(t+s)z-1, C = tsz^4+s(1-t)z^3+tz^2.
EXAMPLE
Row 4 is 1,3,0,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, clearly, they have 3, 1, 1, 0, 1 columns of odd length.
Triangle starts
0,1;
1,0,1;
1,3,0,1;
2,4,6,0,1;
4,11,9,10,0,1
MAPLE
eq := z*(1+t*z^2)*f^2-(1-z-t*z+t*z^2-t*z^4-z^3-z^2-t*z^3)*f+z^2*(t*z^2+z-t*z+t) = 0: f:= RootOf(eq, f): fser:=simplify(series(f, z = 0, 15)): for n from 2 to 12 do P[n] := sort(coeff(fser, z, n)) end do: for n from 2 to 12 do seq(coeff(P[n], t, k), k=0..n-1)end do; # yields sequence in triangular form
# second Maple program:
b:= proc(n, y, t) option remember; expand(`if`(n=0, 1-t,
`if`(t<0, 0, b(n-1, y+1, 1))+ `if`(t>0 or y<2, 0,
b(n, y-1, -1))+ `if`(y<1, 0, b(n-1, y, 0)*z^
`if`(y::odd, 1, 0))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..n-1))(b(n, 0$2)):
seq(lprint(T(n)), n=2..15); # Alois P. Heinz, Jun 24 2016
MATHEMATICA
b[n_, y_, t_] := b[n, y, t] = Expand[If[n==0, 1-t, If[t<0, 0, b[n-1, y+1, 1]] + If[t>0 || y<2, 0, b[n, y-1, -1]] + If[y<1, 0, b[n-1, y, 0]*z^If[OddQ[y], 1, 0]]]]; T[n_] := Function [p, Table[Coefficient[p, z, i], {i, 0, n-1}]][b[n, 0, 0]]; Table[T[n], {n, 2, 15}] // Flatten (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Jun 22 2016
STATUS
approved