A005772 Number of permutations of length n with 2 cycle lengths.
3, 14, 95, 424, 3269, 21202, 178443, 1622798, 17064179, 177093256, 2293658861, 29296367476, 416567286225, 6250052633294, 103272943796399, 1717954871163982, 32068960264609523, 601640759502181648, 12257756112146028309, 257187849583000601516
Offset: 3
Keywords
References
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Alois P. Heinz, Table of n, a(n) for n = 3..200
- H. S. Wilf, Three problems in combinatorial asymptotics, J. Combin. Theory, A 35 (1983), 199-207.
Crossrefs
Column k=2 of A218868.
Programs
-
Maple
with(numtheory): with(combinat): a:= n-> add(add(add((i-1)!^j*(d-1)!^((n-i*j)/d)* multinomial(n, i$j, d$((n-i*j)/d))/j!/((n-i*j)/d)!, d=select(x->xAlois P. Heinz, Feb 01 2014
-
Mathematica
multinomial[n_, k_List] := n!/Times @@ (k!); a[n_] := Sum[Sum[Sum[(i - 1)!^j*(d-1)!^((n-i*j)/d)*multinomial[n, Join[Array[i&, j], Array[d&, ((n - i*j)/d)]]]/j!/((n-i*j)/d)!, {d, Select[If[n == i*j, {}, Divisors[n - i*j]], #Jean-François Alcover, Nov 12 2015, after Alois P. Heinz *)
Extensions
More terms from Vladeta Jovovic, Nov 02 2003