login
Number of degree-n permutations of order exactly 5.
5

%I #16 Sep 08 2022 08:45:03

%S 0,0,0,0,0,24,144,504,1344,3024,78624,809424,4809024,20787624,

%T 72696624,1961583624,28478346624,238536558624,1425925698624,

%U 6764765838624,189239120970624,3500701266525624,37764092547420624,288099608198025624

%N Number of degree-n permutations of order exactly 5.

%C The number of degree-n permutations of order exactly p (where p is prime) satisfies a(n) =a(n-1) + (1+a(n-p))*(n-1)!/(n-p)! with a(n)=0 if p>n. Also a(n) = Sum_{j=1 to floor[n/p]} n!/(j!*(n-p*j)!*(p^j)).

%H Alois P. Heinz, <a href="/A059593/b059593.txt">Table of n, a(n) for n = 0..300</a>

%F a(n) = a(n - 1) + (1 + a(n - 5))*(n - 1)(n - 2)(n - 3)(n - 4).

%F a(n) = Sum_{j=1..floor(n/5)} n!/(j!*(n - 5*j)!*(5^j)).

%F From _G. C. Greubel_, May 14 2019: (Start)

%F a(n) = A052501(n) - 1.

%F E.g.f.: exp(x + x^5/5) - exp(x). (End)

%p a:= proc(n) option remember;

%p `if`(n<5, 0, a(n-1)+(1+a(n-5))*(n-1)!/(n-5)!)

%p end:

%p seq(a(n), n=1..30); # _Alois P. Heinz_, Jan 25 2014

%t Table[Sum[n!/(j!*(n-5*j)!*5^j), {j,1,Floor[n/5]}], {n,0,25}] (* _G. C. Greubel_, May 14 2019 *)

%o (PARI) {a(n) = sum(j=1,floor(n/5), n!/(j!*(n-5*j)!*5^j))}; \\ _G. C. Greubel_, May 14 2019

%o (Magma) m:=30; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Exp(x + x^5/5) )); [Factorial(n-1)*b[n]-1: n in [1..m]]; // _G. C. Greubel_, May 14 2019

%o (Sage) m = 30; T = taylor(exp(x + x^5/5) -exp(x), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # _G. C. Greubel_, May 14 2019

%Y Cf. A001471, A052501.

%Y Column k=5 of A057731. - _Alois P. Heinz_, Feb 16 2013

%K nonn

%O 0,6

%A _Henry Bottomley_, Jan 26 2001