OFFSET
1,1
EXAMPLE
a(1) = 5 (prime): 5^2 + 12 = 37; 5^2 - 12 = 13; 5^3 + 12 = 137; 5^3 - 12 = 113; are all prime.
a(2) = 75641(prime): 75641^2 + 12 = 5721560893; 75641^2 - 12 = 5721560869; 75641^3 + 12 = 432784586599733; 75641^3 - 12 = 432784586599709; are all prime.
MAPLE
select(p -> andmap(isprime, [p, p^2+12, p^2-12, p^3+12, p^3-12]), [seq(p, p=1.. 10^6)]);
MATHEMATICA
k = 12; Select[Prime[Range[10^6]], PrimeQ[#^2 + k] && PrimeQ[#^2 - k] && PrimeQ[#^3 + k] && PrimeQ[#^3 - k] &]
PROG
(PARI) forprime(p = 1, 1000000, if(isprime(p^2+12) && isprime(p^2-12) && isprime(p^3+12) && isprime(p^3-12), print1(p, ", ")));
(Magma) [p: p in PrimesUpTo(1000000) | IsPrime(p^2+12) and IsPrime(p^2-12) IsPrime(p^3+12) and IsPrime(p^3-12)];
CROSSREFS
KEYWORD
nonn,less
AUTHOR
K. D. Bajpai, Oct 11 2015
STATUS
approved