OFFSET
1,1
COMMENTS
p and q cannot both be odd, thus p=2 or q=2. If q=2 then we want primes of form p^2+8. But 8=-1 mod 3. Since p is prime, p=3 or == 1 or 2 mod 3. If p=1 or 2 mod 3 then 3|p^2+8, so p=3. Therefore with the exception of the first entry (3^2+8=17) this sequence is really just primes of the form q^3+4.
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000
FORMULA
Primes in A045699.
EXAMPLE
a(4) = 6863 = 19^3 + 2^2.
MAPLE
for n from 1 to 1000 do if (isprime((ithprime(n))^3+4)) then print((ithprime(n))^3+4, 4); fi; if (isprime((ithprime(n))^2+8)) then print((ithprime(n))^2+8, 8); fi; od;
MATHEMATICA
Join[{17}, Select[Prime[Range[300]]^3+4, PrimeQ]] (* Harvey P. Dale, Jul 20 2011 *)
PROG
(PARI) list(lim)=my(v=List([17]), t); lim\=1; forprime(p=3, sqrtnint(lim\1-4, 3), if(isprime(t=p^3+4), listput(v, t))); Set(v) \\ Charles R Greathouse IV, Feb 07 2017
CROSSREFS
KEYWORD
nice,nonn,easy
AUTHOR
EXTENSIONS
Extension and comment from Joe DeMaio (jdemaio(AT)kennesaw.edu)
STATUS
approved