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”).

A273900
Number of columns of length 1 in all bargraphs of semiperimeter n (n>=2).
2
1, 2, 5, 14, 40, 116, 341, 1014, 3045, 9222, 28137, 86408, 266887, 828560, 2584111, 8092646, 25438494, 80235386, 253854855, 805447478, 2562252423, 8170557076, 26112495767, 83626191936, 268331079046, 862537758650, 2777237155053, 8956318767652, 28925845302365
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-3z+z^2-z^3-(1-z)Q)/(2z^2), where Q = sqrt((1-z)(1-3z-z^2-z^3)).
a(n) = Sum(k*A273899(n,k), k>=1).
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
EXAMPLE
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.
MAPLE
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);
# second Maple program:
a:= proc(n) option remember; `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))
end:
seq(a(n), n=2..35); # Alois P. Heinz, Jun 07 2016
MATHEMATICA
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 *)
CROSSREFS
Sequence in context: A329275 A036908 A293346 * A126220 A136304 A190254
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Jun 07 2016
STATUS
approved