A274493 Number of bargraphs of semiperimeter n having no horizontal segments of length 1 (n>=2). By a horizontal segment of length 1 we mean a horizontal step that is not adjacent to any other horizontal step.
0, 1, 2, 3, 6, 13, 27, 57, 123, 267, 584, 1289, 2864, 6399, 14373, 32435, 73498, 167175, 381551, 873541, 2005622, 4616895, 10653607, 24638263, 57097885, 132575577, 308378460, 718506295, 1676706422, 3918515001, 9170350093, 21488961641, 50417138776, 118425429213, 278476687643
Offset: 2
Examples
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.
Links
- M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
Programs
-
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);
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