OFFSET
1,1
COMMENTS
a(71) > 38000 (if it exists). - Robert Price, Oct 23 2017
LINKS
Carlos Rivera, Puzzle 887. p(n)^c-2 is prime, The Prime Puzzles and Problems Connection.
EXAMPLE
a(1) = 2 because 2^2 - 2 = 2 is prime;
a(2) = 2 because 3^2 - 2 = 7 is prime;
a(3) = 1 because 5^1 - 2 = 3 is prime;
a(4) = 1 because 7^1 - 2 = 5 is prime.
And these are the least exponents to satisfy the requested property.
MATHEMATICA
Table[c = 1; While[! PrimeQ[Prime[n]^c - 2], c++]; c, {n, 24}] (* Michael De Vlieger, Sep 11 2017 *)
PROG
(PARI) a(n) = {my(c = 1, p = prime(n)); while(!isprime(p^c-2), c++); c; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Sep 11 2017
EXTENSIONS
a(66)-a(70) from Robert Price, Oct 23 2017
STATUS
approved