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

A273720
Number of horizontal steps in the peaks of all bargraphs having semiperimeter n (n>=2).
6
1, 3, 8, 21, 57, 162, 479, 1458, 4528, 14259, 45349, 145289, 468121, 1515128, 4922145, 16040310, 52411294, 171646085, 563266323, 1851661113, 6096654978, 20101681834, 66362538332, 219336702948, 725692113292, 2403295565913, 7966021263923, 26425616887971
OFFSET
2,2
LINKS
A. Blecher, C. Brennan, and A. Knopfmacher, Peaks in bargraphs, Trans. Royal Soc. South Africa, 71, No. 1, 2016, 97-103.
M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
FORMULA
G.f.: g(z) = z^2*(1-2*z+2*z^2-2*z^3+z^4+Q)/(2*Q*(1-z)^2), where Q = sqrt((1-z)^5*(1-3*z-z^2-z^3)).
a(n) = Sum(k*A273719(n,k), k>=1).
a(n) = ((2*(3*n-7))*(2*n-9)*a(n-1) -(254-155*n+22*n^2)*a(n-2) +(2*(101 -58*n +8*n^2))*a(n-3) -(86-47*n+6*n^2)*a(n-4) +(2*(n-6))*(2*n-5)*a(n-5) -(n-6)*(2*n-5)*a(n-6))/((n-2)*(2*n-9)) for n>=6. - Alois P. Heinz, Jun 01 2016
EXAMPLE
a(4) = 8 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 drawings show that they have 3,1,1,2,1 horizontal steps in their peaks.
MAPLE
g := (1/2)*z^2*(1-2*z+2*z^2-2*z^3+z^4+Q)/((1-z)^2*Q): Q := sqrt((1-z)^5*(1-3*z-z^2-z^3)): gser := series(g, z = 0, 35): seq(coeff(gser, z, n), n = 2 .. 32);
# second Maple program:
a:= proc(n) option remember; `if`(n<6, [0$2, 1, 3, 8, 21][n+1],
((2*(3*n-7))*(2*n-9)*a(n-1) -(254-155*n+22*n^2)*a(n-2)
+(2*(101-58*n+8*n^2))*a(n-3) -(86-47*n+6*n^2)*a(n-4)
+(2*(n-6))*(2*n-5)*a(n-5)-(n-6)*(2*n-5)*a(n-6))/
((n-2)*(2*n-9)))
end:
seq(a(n), n=2..40); # Alois P. Heinz, Jun 01 2016
MATHEMATICA
a[n_] := a[n] = If[n<6, {0, 0, 1, 3, 8, 21}[[n+1]], ((2*(3*n-7))*(2*n - 9)*a[n-1] - (254 - 155*n + 22*n^2)*a[n-2] + (2*(101 - 58*n + 8*n^2))*a[n - 3] - (86 - 47*n + 6*n^2)*a[n-4] + (2*(n-6))*(2*n - 5)*a[n-5] - (n-6)*(2*n - 5)*a[n-6])/((n-2)*(2*n - 9))]; Table[a[n], {n, 2, 40}] (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Jun 01 2016
STATUS
approved