OFFSET
1,1
COMMENTS
Also, prime powers q = p^(3^k) with prime p and nonnegative integer k and the property that q^2 + q + 1 is prime, since the exponent must be a power of 3, from the theory of cyclotomic polynomials. 17^(3^7) is in the sequence, generating a 5382-digit prime.
LINKS
Martin Becker, Table of n, a(n) for n = 1..20000
EXAMPLE
5 = 5^1 is a term: 5^2 + 5 + 1 = 31 is prime.
8 = 2^3 is a term: 8^2 + 8 + 1 = 73 is prime.
MATHEMATICA
Select[Range@2000, PrimePowerQ@#&&PrimeQ[#^2+#+1]&] (* Giorgos Kalogeropoulos, May 18 2021 *)
PROG
(PARI) N=50; i=0; a=vector(N); for(q=2, oo, if(isprimepower(q) && isprime(q^2+q+1), i+=1; a[i]=q; if(i==N, break))); a
CROSSREFS
KEYWORD
nonn
AUTHOR
Martin Becker, May 18 2021
STATUS
approved