login
Number of odd-length columns in all bargraphs having semiperimeter n (n>=2).
4

%I #19 Jul 26 2022 14:41:06

%S 1,2,6,20,64,204,656,2120,6873,22350,72881,238232,780384,2561164,

%T 8419766,27721784,91397927,301710074,997087170,3298556716,10922576840,

%U 36199599880,120068987717,398547827336,1323821438203,4400043488826,14633372199291

%N Number of odd-length columns in all bargraphs having semiperimeter n (n>=2).

%H Alois P. Heinz, <a href="/A273902/b273902.txt">Table of n, a(n) for n = 2..1000</a>

%H M. Bousquet-Mélou and A. Rechnitzer, <a href="http://dx.doi.org/10.1016/S0196-8858(02)00553-5">The site-perimeter of bargraphs</a>, Adv. in Appl. Math. 31 (2003), 86-112.\

%H Emeric Deutsch, S Elizalde, <a href="http://arxiv.org/abs/1609.00088">Statistics on bargraphs viewed as cornerless Motzkin paths</a>, arXiv preprint arXiv:1609.00088, 2016

%F 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)).

%F a(n) = Sum(k*A273901(n,k), k>=0).

%F 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

%e 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.

%p 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);

%p # second Maple program:

%p a:= proc(n) option remember; `if`(n<7, [0$2, 1, 2, 6, 20, 64]

%p [n+1], ((n-1)*(55*n-178)*a(n-1)-(2*(n-2))*(32*n-143)*

%p a(n-2)+(501-370*n+69*n^2)*a(n-3)-(524-443*n+64*n^2)*

%p a(n-4)+(526-215*n+21*n^2)*a(n-5)-(4*(3*n+2))*(n-6)*

%p a(n-6)+(n-7)*(-29+7*n)*a(n-7))/ (n*(12*n-35)))

%p end:

%p seq(a(n), n=2..35); # _Alois P. Heinz_, Jun 23 2016

%t 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 *)

%Y Cf. A082582, A273901, A273903, A273904.

%K nonn

%O 2,2

%A _Emeric Deutsch_, Jun 22 2016