OFFSET
0,1
COMMENTS
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
LINKS
Giovanni Resta, Table of n, a(n) for n = 0..1000
MATHEMATICA
Do[k = 1; While[ !PrimeQ[ Prime[k]*n! + 1], k++ ]; Print[ Prime[k]], {n, 1, 75} ]
spp[n_]:=Module[{p=2, nf=n!}, While[!PrimeQ[p*nf+1], p=NextPrime[p]]; p]; Array[ spp, 80, 0] (* Harvey P. Dale, May 17 2019 *)
PROG
(PARI) a(n) = {my(p=2); while (!isprime(p*n! + 1), p = nextprime(p+1)); p; } \\ Michel Marcus, May 28 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Dec 15 1999
EXTENSIONS
More terms from James A. Sellers, Dec 16 1999
STATUS
approved