login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A005772 Number of permutations of length n with 2 cycle lengths.
(Formerly M2978)
6

%I M2978 #23 Apr 08 2016 06:50:50

%S 3,14,95,424,3269,21202,178443,1622798,17064179,177093256,2293658861,

%T 29296367476,416567286225,6250052633294,103272943796399,

%U 1717954871163982,32068960264609523,601640759502181648,12257756112146028309,257187849583000601516

%N Number of permutations of length n with 2 cycle lengths.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Alois P. Heinz, <a href="/A005772/b005772.txt">Table of n, a(n) for n = 3..200</a>

%H H. S. Wilf, <a href="http://dx.doi.org/10.1016/0097-3165(83)90007-9">Three problems in combinatorial asymptotics</a>, J. Combin. Theory, A 35 (1983), 199-207.

%p with(numtheory): with(combinat):

%p a:= n-> add(add(add((i-1)!^j*(d-1)!^((n-i*j)/d)*

%p multinomial(n, i$j, d$((n-i*j)/d))/j!/((n-i*j)/d)!,

%p d=select(x->x<i, divisors(n-i*j))), j=1..n/i), i=2..n-1):

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Feb 01 2014

%t 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]], #<i&]}], {j, 1, n/i}], {i, 2, n-1}]; Table[a[n], {n, 3, 30}] (* _Jean-François Alcover_, Nov 12 2015, after _Alois P. Heinz_ *)

%Y Column k=2 of A218868.

%K nonn

%O 3,1

%A _Simon Plouffe_

%E More terms from _Vladeta Jovovic_, Nov 02 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)