login
A153325
Primes p such that p^3 - 30 and p^3 + 30 are also primes.
1
7, 11, 29, 127, 197, 241, 443, 487, 509, 547, 601, 859, 1459, 1709, 1787, 2819, 2837, 3041, 3169, 3391, 3739, 4019, 5639, 5651, 6011, 6053, 6737, 6793, 6827, 6947, 7039, 7283, 7487, 7547, 9587, 10753, 11027, 11617, 11677, 11863, 12721, 12853, 13163
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_]:=PrimeQ[n^3-30]&&PrimeQ[n^3+30]; lst={}; Do[If[fQ@Prime[n], AppendTo[lst, Prime[n]]], {n, 8!}]; lst
(* Second program: *)
Select[Prime@ Range@ 1600, AllTrue[#^3 + 30 {-1, 1}, PrimeQ] &] (* Michael De Vlieger, Jan 21 2018 *)
PROG
(Magma) [p: p in PrimesUpTo(50000)|IsPrime(p^3-30) and IsPrime(p^3+30)] // Vincenzo Librandi, Jan 30 2011
(PARI) isok(p) = isprime(p) && isprime(p^3-30) && isprime(p^3+30); \\ Michel Marcus, Jan 22 2018
KEYWORD
nonn
AUTHOR
STATUS
approved