login
Number of permutations of [n] without fixed points and all cycles equal length.
1

%I #18 Aug 14 2023 15:53:29

%S 1,0,1,2,9,24,175,720,6405,42560,436401,3628800,48073795,479001600,

%T 7116730335,88966701824,1474541093025,20922789888000,400160588853025,

%U 6402373705728000,133991603578884051,2457732174030848000,55735573291977790575,1124000727777607680000

%N Number of permutations of [n] without fixed points and all cycles equal length.

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

%F a(n) = Sum_{d|n, d<n} (n!/d!)*(d/n)^d for n>0, a(0) = 1.

%F a(n) = A261431(n) for n in { A000040, A001358 }.

%e a(4) = 9: (1,2)(3,4), (1,3)(2,4), (1,4)(2,3), (2,3,4,1), (2,4,1,3), (3,1,4,2), (3,4,2,1), (4,1,2,3), (4,3,1,2).

%p a:= n-> `if`(n=0, 1, add(n!/d!*(d/n)^d, d=numtheory[divisors](n) minus {n})):

%p seq(a(n), n=0..23); # _Alois P. Heinz_, Apr 20 2021

%o (PARI) a(n) = if (n, sumdiv(n, d, if (d<n, (n!/d!)*(d/n)^d)), 1); \\ _Michel Marcus_, Apr 21 2021

%Y Cf. A000040, A001358, A005225, A261431.

%K nonn,easy

%O 0,4

%A _Gary Yane_, Apr 20 2021