login
Number of horizontal steps in the peaks of all bargraphs having semiperimeter n (n>=2).
6

%I #32 Nov 29 2016 08:46:10

%S 1,3,8,21,57,162,479,1458,4528,14259,45349,145289,468121,1515128,

%T 4922145,16040310,52411294,171646085,563266323,1851661113,6096654978,

%U 20101681834,66362538332,219336702948,725692113292,2403295565913,7966021263923,26425616887971

%N Number of horizontal steps in the peaks of all bargraphs having semiperimeter n (n>=2).

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

%H A. Blecher, C. Brennan, and A. Knopfmacher, <a href="http://dx.doi.org/10.1080/0035919X.2015.1059905">Peaks in bargraphs</a>, Trans. Royal Soc. South Africa, 71, No. 1, 2016, 97-103.

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

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

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

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

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

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

%p # second Maple program:

%p a:= proc(n) option remember; `if`(n<6, [0$2, 1, 3, 8, 21][n+1],

%p ((2*(3*n-7))*(2*n-9)*a(n-1) -(254-155*n+22*n^2)*a(n-2)

%p +(2*(101-58*n+8*n^2))*a(n-3) -(86-47*n+6*n^2)*a(n-4)

%p +(2*(n-6))*(2*n-5)*a(n-5)-(n-6)*(2*n-5)*a(n-6))/

%p ((n-2)*(2*n-9)))

%p end:

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

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

%Y Cf. A075126, A082582, A273719.

%K nonn

%O 2,2

%A _Emeric Deutsch_, Jun 01 2016