login
A263174
Primes p such that p^2 +- 12 and p^3 +- 12 are also primes.
0
5, 75641, 249199, 294001, 378779, 438479, 535229, 897349, 918989, 933199, 1271069, 1393771, 1403569, 2270669, 2523991, 2752219, 3427751, 3966761, 4348489, 4496941, 4621619, 4731929, 4851719, 5721281, 7518869, 7606801, 8413411, 8649881, 8757691, 9068659, 9586999
OFFSET
1,1
COMMENTS
Intersection of A153116 and A153322.
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
Sequence in context: A050816 A171981 A145232 * A123591 A133381 A366270
KEYWORD
nonn,less
AUTHOR
K. D. Bajpai, Oct 11 2015
STATUS
approved