%I #17 Jun 19 2018 05:17:51
%S 3,3,2,2,2,2,2,2,5,3,29,11,3,5,2,2,53,2,67,79,5,61,2,7,13,5,3,11,2,
%T 107,43,7,31,199,293,17,43,197,109,41,13,277,11,167,17,83,157,31,199,
%U 131,13,5,89,47,223,83,43,7,139,151,211,19,19,23,43,311,61,53,191,163,11
%N a(n) is the smallest prime p such that p*n! - 1 is prime.
%C The PFGW program has been used to certify all the primes corresponding to the terms up to a(1000), using a deterministic test which exploits the factorization of a(n) + 1. - _Giovanni Resta_, May 30 2018
%H Giovanni Resta, <a href="/A064983/b064983.txt">Table of n, a(n) for n = 0..1000</a> (terms 0..200 from Harry J. Smith)
%t Do[k = 1; While[ !PrimeQ[ Prime[k]*n! - 1], k++ ]; Print[ Prime[k]], {n, 1, 75} ]
%o (PARI) { allocatemem(932245000); for (n=0, 200, f=n!; k=1; while(!isprime(prime(k)*f - 1), k++); write("b064983.txt", n, " ", prime(k)) ) } \\ _Harry J. Smith_, Oct 02 2009
%Y Cf. A051888.
%K nonn
%O 0,1
%A _Robert G. Wilson v_, Oct 30 2001
|