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!)
A153118 Primes p such that p^2 +- 18 are also primes. 1

%I #11 Sep 08 2022 08:45:39

%S 5,7,11,17,29,41,43,59,71,83,223,283,311,347,389,433,479,601,619,881,

%T 907,967,983,991,1039,1093,1151,1471,1567,1723,1873,1877,1907,1931,

%U 1933,1987,2309,2531,2953,3037,3461,3539,3853,4001,4003,4007,4073,4091,4253

%N Primes p such that p^2 +- 18 are also primes.

%H Vincenzo Librandi, <a href="/A153118/b153118.txt">Table of n, a(n) for n = 1..1000</a>

%t fQ[n_]:=PrimeQ[n^2-18]&&PrimeQ[n^2+18];lst={};Do[If[fQ@Prime[n],AppendTo[lst,Prime[n]]],{n,7!}];lst

%t Select[Prime[Range[700]],And@@PrimeQ/@{#^2+18, #^2-18}&] (* _Harvey P. Dale_, Mar 12 2011 *)

%o (Magma) [p: p in PrimesUpTo(4500) | IsPrime(p^2-18) and IsPrime(p^2+18)]; // _Vincenzo Librandi_, Apr 09 2013

%Y Cf. A153116.

%K nonn,easy

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Dec 18 2008, Dec 20 2008

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 April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)