A302897 Number of permutations of [n] having exactly four alternating descents.
16, 117, 1056, 8699, 76840, 704834, 6847224, 70145634, 758805360, 8650769675, 103790273632, 1308042935717, 17285090008280, 239069573622720, 3454877140757160, 52081336911782580, 817705146857293920, 13351745346381390705, 226414777897783513040
Offset: 5
Keywords
Examples
a(5) = 16: 21435, 21534, 31425, 31524, 32415, 32514, 41325, 41523, 42315, 42513, 43512, 51324, 51423, 52314, 52413, 53412.
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.
Crossrefs
Column k=5 of A145876.
Programs
-
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 *)
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
Comments