OFFSET
5,1
COMMENTS
Index i is an alternating descent of permutation p if either i is odd and p(i) > p(i+1), or i is even and p(i) < p(i+1).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 5..400
D. Chebikin, Variations on descents and inversions in permutations, The Electronic J. of Combinatorics, 15 (2008), #R132.
FORMULA
a(n) ~ (4 - Pi)^4 * 2^(n + 5/2) * n^(n + 9/2) / (4! * Pi^(n + 9/2) * exp(n)). - Vaclav Kotesovec, Apr 29 2018
E.g.f.: ((x^4 - 12*x^3 + 60*x^2 - 168*x + 48*sin(x) + 96)*cos(x)^2 - ((x^3 - 4*x^2 + 12*x - 24)*sin(x) + 5*x^3 - 32*x^2 + 60*x - 24)*x*cos(x) + (- 6*x^4 + 52*x^3 - 168*x^2 + 192*x - 96)*sin(x) - 6*x^4 + 44*x^3 - 120*x^2 + 192*x - 96)/(24*cos(x)^3 + (- 24*sin(x) + 72)*cos(x)^2 + (48*sin(x) - 48)*cos(x) + 96*sin(x) - 96). - Vaclav Kotesovec, Apr 30 2018
EXAMPLE
a(5) = 16: 21435, 21534, 31425, 31524, 32415, 32514, 41325, 41523, 42315, 42513, 43512, 51324, 51423, 52314, 52413, 53412.
MAPLE
b:= proc(u, o) option remember; series(`if`(u+o=0, 1,
add(b(o+j-1, u-j)*x, j=1..u)+
add(b(o-j, u-1+j), j=1..o)), x, 6)
end:
a:= n-> coeff(b(n, 0), x, 5):
seq(a(n), n=5..30);
MATHEMATICA
nmax = 30; Drop[CoefficientList[Series[((x^4 - 12*x^3 + 60*x^2 - 168*x + 48*Sin[x] + 96)*Cos[x]^2 - ((x^3 - 4*x^2 + 12*x - 24)*Sin[x] + 5*x^3 - 32*x^2 + 60*x - 24)*x*Cos[x] + (- 6*x^4 + 52*x^3 - 168*x^2 + 192*x - 96)*Sin[x] - 6*x^4 + 44*x^3 - 120*x^2 + 192*x - 96)/(24*Cos[x]^3 + (- 24*Sin[x] + 72)*Cos[x]^2 + (48*Sin[x] - 48)*Cos[x] + 96*Sin[x] - 96), {x, 0, nmax}], x] * Range[0, nmax]!, 5] (* Vaclav Kotesovec, Apr 30 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 15 2018
STATUS
approved