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”).

A153120
Primes p such that p^2 +- 42 are also primes.
6
5, 11, 13, 23, 53, 89, 101, 103, 109, 181, 197, 307, 313, 457, 467, 571, 691, 769, 863, 907, 1061, 1087, 1223, 1453, 1487, 1607, 1913, 2129, 2161, 2311, 2729, 2741, 2767, 2917, 3313, 3343, 3359, 3433, 4363, 4373, 4547, 4703, 4783, 4787, 4877, 5119, 5237
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_]:=PrimeQ[n^2-42]&&PrimeQ[n^2+42]; lst={}; Do[If[fQ@Prime[n], AppendTo[lst, Prime[n]]], {n, 7!}]; lst
Select[Prime[Range[6000]], PrimeQ[#^2 - 42]&&PrimeQ[#^2 + 42]&] (* Vincenzo Librandi, Apr 08 2013 *)
PROG
(Magma) [p: p in PrimesUpTo(6000) | IsPrime(p^2-42) and IsPrime(p^2+42)]; // Vincenzo Librandi, Apr 08 2013
CROSSREFS
Sequence in context: A079732 A309158 A161540 * A115782 A051654 A225754
KEYWORD
nonn,easy
AUTHOR
STATUS
approved