login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A273902
Number of odd-length columns in all bargraphs having semiperimeter n (n>=2).
4
1, 2, 6, 20, 64, 204, 656, 2120, 6873, 22350, 72881, 238232, 780384, 2561164, 8419766, 27721784, 91397927, 301710074, 997087170, 3298556716, 10922576840, 36199599880, 120068987717, 398547827336, 1323821438203, 4400043488826, 14633372199291
OFFSET
2,2
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-z-z^2-z^3)-(1-z^2)Q)/(2(1+z^2)*Q), where Q = sqrt((1-z)(1-3z-z^2-z^3)).
a(n) = Sum(k*A273901(n,k), k>=0).
D-finite with recurrence n*(12*n-35)*a(n) -(n-1)*(55*n-178)*a(n-1) +2*(n-2)*(32*n-143)*a(n-2) +(-69*n^2+370*n-501)*a(n-3) +(64*n^2-443*n+524)*a(n-4) +(-21*n^2+215*n-526)*a(n-5) +4*(3*n+2)*(n-6)*a(n-6) -(7*n-29)*(n-7)*a(n-7)=0. - R. J. Mathar, Jul 26 2022
EXAMPLE
a(4) = 6 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.
MAPLE
Q := sqrt((1-z)*(1-3*z-z^2-z^3)): g := (((1-z)*(1-z-z^2-z^3)-(1-z^2)*Q)*(1/2))/((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$2, 1, 2, 6, 20, 64]
[n+1], ((n-1)*(55*n-178)*a(n-1)-(2*(n-2))*(32*n-143)*
a(n-2)+(501-370*n+69*n^2)*a(n-3)-(524-443*n+64*n^2)*
a(n-4)+(526-215*n+21*n^2)*a(n-5)-(4*(3*n+2))*(n-6)*
a(n-6)+(n-7)*(-29+7*n)*a(n-7))/ (n*(12*n-35)))
end:
seq(a(n), n=2..35); # Alois P. Heinz, Jun 23 2016
MATHEMATICA
Q = Sqrt[(1-z)*(1-3*z-z^2-z^3)]; g = (((1-z)*(1-z-z^2-z^3) - (1-z^2)*Q)*(1/2))/((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 22 2016
STATUS
approved