login
Number of columns of length 1 in all bargraphs of semiperimeter n (n>=2).
2

%I #23 Jul 24 2022 12:32:07

%S 1,2,5,14,40,116,341,1014,3045,9222,28137,86408,266887,828560,2584111,

%T 8092646,25438494,80235386,253854855,805447478,2562252423,8170557076,

%U 26112495767,83626191936,268331079046,862537758650,2777237155053,8956318767652,28925845302365

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

%H Alois P. Heinz, <a href="/A273900/b273900.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-3z+z^2-z^3-(1-z)Q)/(2z^2), where Q = sqrt((1-z)(1-3z-z^2-z^3)).

%F a(n) = Sum(k*A273899(n,k), k>=1).

%F D-finite with recurrence (n+2)*a(n) -4*n*a(n-1) +2*(n-4)*a(n-2) -2*a(n-3) +(n-6)*a(n-4)=0. - _R. J. Mathar_, Jul 24 2022

%e a(4) = 5 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 3, 1, 1, 0, 0 for the number of columns of length 1.

%p g:=(1/2)*(1-z)*(1-3*z+z^2-z^3-(1-z)*Q)/z^2: Q:=sqrt((1-z)*(1-3*z-z^2-z^3)): gser:= series(g,z=0,40): seq(coeff(gser,z,n),n=2..35);

%p # second Maple program:

%p a:= proc(n) option remember; `if`(n<5, [0, 1, 2, 5][n], (

%p 4*n*a(n-1)-2*(n-4)*a(n-2)+2*a(n-3)-(n-6)*a(n-4))/(n+2))

%p end:

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

%t a[n_] := a[n] = If[n<5, {0, 1, 2, 5}[[n]], (4*n*a[n-1] - 2*(n-4)*a[n-2] + 2*a[n-3] - (n-6)*a[n-4])/(n+2)]; Table[a[n], {n, 2, 35}] (* _Jean-François Alcover_, Dec 02 2016 after _Alois P. Heinz_ *)

%Y Cf. A082582, A273899.

%K nonn

%O 2,2

%A _Emeric Deutsch_, Jun 07 2016