A302895 Number of permutations of [n] having exactly two alternating descents.
2, 7, 36, 182, 1056, 6669, 46348, 350240, 2866632, 25260211, 238550196, 2403846954, 25749417440, 292191829273, 3501634042140, 44194287012404, 585947863072440, 8142408896706495, 118341851934179140, 1795485894869716670, 28386889319060192592
Offset: 3
Keywords
Examples
a(3) = 2: 213, 312. a(4) = 7: 1243, 1342, 2134, 2341, 3124, 4123, 4321.
Links
- Alois P. Heinz, Table of n, a(n) for n = 3..483
- D. Chebikin, Variations on descents and inversions in permutations, The Electronic J. of Combinatorics, 15 (2008), #R132.
Crossrefs
Column k=3 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, 4) end: a:= n-> coeff(b(n, 0), x, 3): seq(a(n), n=3..30);
-
Mathematica
nmax = 30; Drop[CoefficientList[Series[((4 + (-2 + x)*x - 4*Cos[x])*(1 + Cos[x]) + (4 + (-6 + x)*x)*Sin[x])/(3 + 2*Cos[x] - Cos[2*x] - 2*(2 + Cos[x])*Sin[x]), {x, 0, nmax}], x] * Range[0, nmax]!, 3] (* Vaclav Kotesovec, Apr 30 2018 *)
Formula
a(n) ~ (4 - Pi)^2 * 2^(n + 3/2) * n^(n + 5/2) / (exp(n) * Pi^(n + 5/2)). - Vaclav Kotesovec, Apr 29 2018
E.g.f.: ((4 + (-2 + x)*x - 4*cos(x))*(1 + cos(x)) + (4 + (-6 + x)*x)*sin(x))/(3 + 2*cos(x) - cos(2*x) - 2*(2 + cos(x))*sin(x)). - Vaclav Kotesovec, Apr 30 2018
Comments