login
Number of permutations of {1,2,...,n} having equal numbers of 1-cycles and 2-cycles.
1

%I #12 Jul 06 2020 17:19:56

%S 1,0,0,5,6,24,325,1770,13020,130004,1276956,13855500,167506735,

%T 2177721480,30454243716,456940935269,7311585023400,124290741884160,

%U 2237240377496620,42507759488340744,850154135238709416,17853233727681764600,392771198006845906920

%N Number of permutations of {1,2,...,n} having equal numbers of 1-cycles and 2-cycles.

%H Alois P. Heinz, <a href="/A335827/b335827.txt">Table of n, a(n) for n = 0..450</a>

%H H. S. Wilf, <a href="http://www.math.upenn.edu/~wilf/DownldGF.html">Generatingfunctionology</a>, 2nd edn., Academic Press, NY, 1994, p. 147.

%F 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).

%F a(n)/n! ~ exp(-3/2) Sum_{k>=0} 1/(2^k*k!^2) = 0.34944033... .

%e 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.

%p a:= proc(n, t) option remember; `if`(n<5, [1, 0$2, 5, 6][n+1],

%p (2*(n-1)^2*a(n-1)+(n-1)*(n-2)*((4*n+3)*a(n-3)

%p -7*(n-3)*a(n-4)+2*(n-3)*(n-4)*a(n-5)))/(2*n))

%p end:

%p seq(a(n), n=0..25); # _Alois P. Heinz_, Jun 25 2020

%t nn = 20; f[x_] := Sum[x^(3 k)/(2^k k!^2), {k, 0, \[Infinity]}];

%t Range[0, nn]! CoefficientList[Series[f[x] Exp[-x - x^2/2]/(1 - x), {x, 0, nn}], x]

%Y Cf. A038205.

%K nonn

%O 0,4

%A _Geoffrey Critzer_, Jun 25 2020