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!)
A247978 Number of permutations of [n] that have no prime fixed points. 2

%I #31 Mar 08 2017 09:30:26

%S 1,1,1,3,14,64,426,2790,24024,229080,2399760,25022880,312273360,

%T 3884393520,56255149440,869007242880,14266826784000,233845982899200,

%U 4309095479673600,79300508301907200,1620482929875532800,34699018357638835200,777011144137311283200

%N Number of permutations of [n] that have no prime fixed points.

%H Alois P. Heinz, <a href="/A247978/b247978.txt">Table of n, a(n) for n = 0..400</a>

%F a(n) = Sum_{j=0..pi(n)} (-1)^(j)*C(pi(n),j)*(n-j)!, with pi = A000720.

%e a(2) = 1: 21.

%e a(3) = 3: 132, 231, 312.

%e a(4) = 14: 1324, 1342, 1423, 2143, 2314, 2341, 2413, 3124, 3142, 3412, 3421, 4123, 4312, 4321.

%p with(numtheory):

%p a:= n-> add((-1)^(j)*binomial(pi(n), j)*(n-j)!, j=0..pi(n)):

%p seq(a(n), n=0..25);

%t a[n_] := Sum[(-1)^j*Binomial[PrimePi[n], j]*(n-j)!, {j, 0, PrimePi[n]}]; Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Feb 26 2017, translated from Maple *)

%o (PARI) for(n=0, 25, print1(sum(j=0, primepi(n), (-1)^j*binomial(primepi(n), j)*(n - j)!), ", ")) \\ _Indranil Ghosh_, Mar 08 2017

%Y Cf. A000720, A161131, A161132, A187847.

%K nonn

%O 0,4

%A _Alois P. Heinz_, Nov 02 2014

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 18 04:56 EDT 2024. Contains 371767 sequences. (Running on oeis4.)