OFFSET
2,3
LINKS
M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
FORMULA
a(n) = A274491(n,0).
G.f.: g(z)=(1-2z+z^2-2z^3-sqrt((1-z)(1-3z+3z^2-5z^3+4z^4-4z^5)))/(2z^2).
D-finite with recurrence (n+2)*a(n) +2*(-2*n-1)*a(n-1) +6*(n-1)*a(n-2) +4*(-2*n+5)*a(n-3) +9*(n-4)*a(n-4) +4*(-2*n+11)*a(n-5) +4*(n-7)*a(n-6)=0. - R. J. Mathar, Jul 22 2022
EXAMPLE
a(4)=2 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 pictures give the values 0,2,2,0,1 for the number of horizontal segments of length 1.
MAPLE
g:=((1-2*z+z^2-2*z^3-sqrt((1-z)*(1-3*z+3*z^2-5*z^3+4*z^4-4*z^5)))*(1/2))/z^2: gser:=series(g, z=0, 40): seq(coeff(gser, z, n), n=2..36);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Emeric Deutsch and Sergi Elizalde, Jun 27 2016
STATUS
approved