login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A153119
Primes p such that p^2 +- 30 are also primes.
8
7, 13, 47, 79, 113, 251, 317, 397, 547, 719, 1013, 1153, 2113, 2141, 2179, 2267, 2309, 2749, 3271, 3557, 3631, 3739, 4243, 4783, 4919, 5399, 5563, 5881, 5927, 6389, 6701, 7229, 7351, 7547, 7691, 7741, 7817, 8191, 8269, 8779, 8807, 9067, 9133, 9277, 10067
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_]:=PrimeQ[n^2-30]&&PrimeQ[n^2+30]; lst={}; Do[If[fQ@Prime[n], AppendTo[lst, Prime[n]]], {n, 7!}]; lst
Select[Prime[Range[2000]], PrimeQ[#^2 + 30] && PrimeQ[#^2 -30]&] (* Vincenzo Librandi, Apr 08 2013 *)
Select[Prime[Range[1500]], AllTrue[#^2+{30, -30}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 13 2019 *)
PROG
(Magma) [p: p in PrimesUpTo(11000) | IsPrime(p^2+30) and IsPrime(p^2-30)]; // Vincenzo Librandi, Apr 08 2013
CROSSREFS
Cf. A153116.
Sequence in context: A374727 A219501 A267310 * A166703 A116522 A320462
KEYWORD
nonn,easy
AUTHOR
STATUS
approved