login
A273904
Number of even-length columns in all bargraphs having semiperimeter n (n>=2).
4
0, 1, 4, 13, 44, 149, 498, 1656, 5498, 18236, 60456, 200409, 664464, 2203755, 7311894, 24271290, 80605250, 267821525, 890305418, 2961015981, 9852481830, 32798011430, 109229396466, 363927233758, 1213012655490, 4044684629394, 13491663770344
OFFSET
2,3
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(z)=((1-z)(1-3z+z^2-z^3)-(1-z)^2*Q)/(2z(1+z^2)*Q), where Q = sqrt((1-z)(1-3z-z^2-z^3)).
a(n) = Sum(k*A273903(n,k), k>=0).
EXAMPLE
a(4) = 4 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 0,1,1,2,0 columns of even length.
MAPLE
Q := sqrt((1-z)*(1-3*z-z^2-z^3)): g := (((1-z)*(1-3*z+z^2-z^3)-(1-z)^2*Q)*(1/2))/(z*(1+z^2)*Q): gser := series(g, z = 0, 40): seq(coeff(gser, z, m), m = 2 .. 35);
# second Maple program:
a:= proc(n) option remember; `if`(n<7, [0$3, 1, 4, 13, 44]
[n+1], ((7*n-22)*(n-6)*a(n-7) -(5*n^2-21*n+6)*a(n-6)+
(21*n^2-180*n+404)*a(n-5) -(43*n^2-265*n+332)*a(n-4)
+(41*n^2-226*n+308)*a(n-3) -(43*n^2-257*n+308)*a(n-2)
+(27*n^2-110*n+36)*a(n-1))/ ((n+1)*(5*n-18)))
end:
seq(a(n), n=2..40); # Alois P. Heinz, Jun 24 2016
MATHEMATICA
Q = Sqrt[(1-z)*(1-3*z-z^2-z^3)]; g = (((1-z)*(1-3*z+z^2-z^3) - (1-z)^2 * Q)*(1/2))/(z*(1+z^2)*Q); gser = g + O[z]^40; CoefficientList[gser, z][[3 ;; -1]] (* Jean-François Alcover, Oct 04 2016, adapted from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Jun 23 2016
STATUS
approved