|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|