OFFSET
0,5
COMMENTS
a(n) = Sum_{k>=0} k * A187250(n,k).
FORMULA
E.g.f.: g(z) = -(1/4)*(2*z - 1 + exp(2*z) + 4*log(1-z)) / (1-z).
a(n) ~ n! * log(n) * (1 + (gamma - (1+exp(2))/4) / log(n)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Dec 10 2021
Conjecture D-finite with recurrence a(n) +(-2*n-3)*a(n-1) +(n+7)*(n-1)*a(n-2) +4*(-n^2+2*n+1)*a(n-3) +4*(n-3)^2*a(n-4)=0. - R. J. Mathar, Jul 22 2022
EXAMPLE
a(4) = 2 because among the permutations of {1,2,3,4} only 3421=(1324) and 4312=(1423) have cycles with more than 2 alternating runs.
MAPLE
g := ((1-2*z-exp(2*z)-4*ln(1-z))*1/4)/(1-z): gser := series(g, z = 0, 25): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 22);
PROG
(PARI) { my(z='z+O('z^33)); concat( [0, 0, 0, 0], Vec(serlaplace(-(1/4)*(2*z-1+exp(2*z)+4*log(1-z))/(1-z)))) } \\ Joerg Arndt, Apr 16 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Mar 08 2011
STATUS
approved