cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A247978 #31 Mar 08 2017 09:30:26
%S A247978 1,1,1,3,14,64,426,2790,24024,229080,2399760,25022880,312273360,
%T A247978 3884393520,56255149440,869007242880,14266826784000,233845982899200,
%U A247978 4309095479673600,79300508301907200,1620482929875532800,34699018357638835200,777011144137311283200
%N A247978 Number of permutations of [n] that have no prime fixed points.
%H A247978 Alois P. Heinz, <a href="/A247978/b247978.txt">Table of n, a(n) for n = 0..400</a>
%F A247978 a(n) = Sum_{j=0..pi(n)} (-1)^(j)*C(pi(n),j)*(n-j)!, with pi = A000720.
%e A247978 a(2) = 1: 21.
%e A247978 a(3) = 3: 132, 231, 312.
%e A247978 a(4) = 14: 1324, 1342, 1423, 2143, 2314, 2341, 2413, 3124, 3142, 3412, 3421, 4123, 4312, 4321.
%p A247978 with(numtheory):
%p A247978 a:= n-> add((-1)^(j)*binomial(pi(n), j)*(n-j)!, j=0..pi(n)):
%p A247978 seq(a(n), n=0..25);
%t A247978 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 A247978 (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 A247978 Cf. A000720, A161131, A161132, A187847.
%K A247978 nonn
%O A247978 0,4
%A A247978 _Alois P. Heinz_, Nov 02 2014