The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A147793 Smallest prime q such that p^q-2 is prime where p ranges over the set of primes numbers. 0
2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 3, 149, 2, 5, 2, 7, 2, 2, 5, 2, 2, 3, 2, 5, 3, 89, 2, 2, 2, 13, 2, 3, 367, 2, 17, 3, 2, 2, 3, 2, 2, 2, 2, 439, 2, 61, 127, 2, 2, 3, 2, 37, 2, 3, 2, 2, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
EXAMPLE
2^2-2 = 2 prime so a(1)=2, 3^2-2= 7 prime a(2)=2. For q=2,3,5, 199^q-2 is not
prime. For q=7, 199^7-2 = 12358664279161397 prime so a(27)=7.
PROG
(PARI) g2(n) = forprime(x=2, n, y=g(1000, x); if(y>0, print1(y", ")))
g(n, m) = p1=0; forprime(p=2, n, y=m^p-2; if(ispseudoprime(y), p1=p; break)); p1
CROSSREFS
Sequence in context: A001991 A305706 A359309 * A352201 A052298 A366441
KEYWORD
nonn
AUTHOR
Cino Hilliard, Nov 13 2008
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 June 6 13:08 EDT 2024. Contains 373128 sequences. (Running on oeis4.)