OFFSET
1,1
LINKS
Daniel Suteu, Table of n, a(n) for n = 1..100
EXAMPLE
2^(2*2)-2^2-1=11 prime, 2 is prime, so P = a(1) = 2.
2^(2*3)-2^3-1=55 composite; 3^(2*3)-3^3-1=701 prime, 3 is prime so P = a(2) = 3.
PROG
(PARI) a(n) = my(p = prime(n), P=2); while(!isprime(P^(2*p)-P^p-1), P = nextprime(P+1)); P; \\ Michel Marcus, Sep 15 2019
(Magma) sol:=[]; for n in [1..31] do p:=2; while not IsPrime(p^(2*q)-p^ NthPrime(n)-1) where q is NthPrime(n) do p:=NextPrime(p); end while; Append(~sol, p); end for; sol; // Marius A. Burtea, Sep 15 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Aug 29 2007
EXTENSIONS
a(33)-a(49) from Daniel Suteu, Sep 15 2019
STATUS
approved