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!)
A051888 a(n) is the smallest prime p such that p*n! + 1 is prime. 7
2, 2, 2, 2, 3, 2, 3, 3, 7, 3, 3, 5, 2, 3, 13, 7, 31, 5, 2, 7, 17, 67, 41, 3, 13, 3, 43, 17, 97, 7, 29, 109, 3, 71, 5, 2, 7, 41, 3, 59, 3, 11, 29, 7, 107, 67, 79, 3, 743, 149, 163, 2, 211, 2, 19, 71, 73, 23, 37, 113, 149, 67, 41, 617, 107, 37, 107, 283, 113, 19, 239, 107, 73, 97, 5 (list; graph; refs; listen; history; text; internal format)
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
FORMULA
Analogous to or subset of A051686; generalization of A005384.
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
Sequence in context: A070098 A029233 A147981 * A327966 A366580 A088019
KEYWORD
nonn
AUTHOR
Labos Elemer, Dec 15 1999
EXTENSIONS
More terms from James A. Sellers, Dec 16 1999
STATUS
approved

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 23 13:11 EDT 2024. Contains 371913 sequences. (Running on oeis4.)