login
A335827
Number of permutations of {1,2,...,n} having equal numbers of 1-cycles and 2-cycles.
1
1, 0, 0, 5, 6, 24, 325, 1770, 13020, 130004, 1276956, 13855500, 167506735, 2177721480, 30454243716, 456940935269, 7311585023400, 124290741884160, 2237240377496620, 42507759488340744, 850154135238709416, 17853233727681764600, 392771198006845906920
OFFSET
0,4
LINKS
H. S. Wilf, Generatingfunctionology, 2nd edn., Academic Press, NY, 1994, p. 147.
FORMULA
E.g.f.: A(x)*B(x) where A(x) is the e.g.f. for A038205 and B(x) = Sum_{k>=0} x^(3*k)/(2^k*k!^2).
a(n)/n! ~ exp(-3/2) Sum_{k>=0} 1/(2^k*k!^2) = 0.34944033... .
EXAMPLE
a(6)=325 because good permutations have cycle sizes 6, 3+3, 3+2+1, 2+2+1+1 and there are respectively 120 + 40 + 120 + 45 = 325 permutations.
MAPLE
a:= proc(n, t) option remember; `if`(n<5, [1, 0$2, 5, 6][n+1],
(2*(n-1)^2*a(n-1)+(n-1)*(n-2)*((4*n+3)*a(n-3)
-7*(n-3)*a(n-4)+2*(n-3)*(n-4)*a(n-5)))/(2*n))
end:
seq(a(n), n=0..25); # Alois P. Heinz, Jun 25 2020
MATHEMATICA
nn = 20; f[x_] := Sum[x^(3 k)/(2^k k!^2), {k, 0, \[Infinity]}];
Range[0, nn]! CoefficientList[Series[f[x] Exp[-x - x^2/2]/(1 - x), {x, 0, nn}], x]
CROSSREFS
Cf. A038205.
Sequence in context: A042283 A047186 A324485 * A166591 A342610 A160529
KEYWORD
nonn
AUTHOR
Geoffrey Critzer, Jun 25 2020
STATUS
approved