login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A153121 Primes p such that p^2 +- 12 and p^2 +- 18 are also primes. 1
5, 7, 29, 41, 1933, 4073, 43049, 46439, 60353, 72031, 150989, 153929, 158551, 158591, 190051, 199247, 226267, 438479, 545749, 613451, 696737, 714841, 734663, 754627, 788353, 793843, 825259, 948457, 1053191, 1057699, 1154159, 1241827 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
fQ[n_] := PrimeQ[n^2 - 12] && PrimeQ[n^2 + 12] && PrimeQ[n^2 - 18] && PrimeQ[n^2 + 18]; lst={}; Do[If[fQ@Prime[n], AppendTo[lst, Prime[n]]], {n, 9!}]; lst
Select[Prime[Range[150000]], And@@PrimeQ/@{#^2 + 12, #^2 - 12, #^2 + 18, #^2 - 18}&] (* Vincenzo Librandi, Apr 09 2013 *)
Select[Prime[Range[150000]], AllTrue[#^2+{12, 18, -12, -18}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 05 2015 *)
PROG
(Magma) [p: p in PrimesUpTo(1250000) | IsPrime(p^2-12) and IsPrime(p^2+12) and IsPrime(p^2-18) and IsPrime(p^2+18)]; // Vincenzo Librandi, Apr 09 2013
CROSSREFS
Sequence in context: A087901 A018776 A104683 * A280926 A070153 A293943
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)