login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A189051 Numbers n such that n+/-2 and n^2+/-2 are all primes. 1
9, 15, 21, 309, 441, 1611, 2955, 3081, 3879, 5529, 7209, 7755, 7875, 13761, 15015, 15729, 16659, 21561, 22155, 35595, 37059, 38199, 45291, 50049, 51429, 59619, 63855, 67215, 67941, 71331, 72891, 83061, 96459, 96909, 102795, 106959, 111495 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

FORMULA

Intersection of A087679 and A108701.

MAPLE

select(n -> isprime(n-2) and isprime(n+2) and isprime(n^2-2) and isprime(n^2+2),

[seq(i, i=3..10^6, 6)]); # Robert Israel, Jun 23 2017

MATHEMATICA

pQ[n_]:=Module[{n2=n^2}, And@@PrimeQ[{n+2, n-2, n2+2, n2-2}]]; Select[Range[ 120000], pQ] (* Harvey P. Dale, Jun 04 2011 *)

PROG

(PARI) forstep(n=3, 100000, 6, if(isprime(n-2)&isprime(n+2)&isprime(n^2-2)&isprime(n^2+2), print1(n", ")))

(MAGMA) [n: n in [1..2000000]|IsPrime(n-2)and IsPrime(n+2)and IsPrime(n^2-2)and IsPrime(n^2+2)]; // Vincenzo Librandi, Apr 20 2011

CROSSREFS

Cf. A087679, A108701.

Sequence in context: A125215 A102739 A124622 * A274288 A172292 A075638

Adjacent sequences:  A189048 A189049 A189050 * A189052 A189053 A189054

KEYWORD

nonn

AUTHOR

Juri-Stepan Gerasimov, Apr 16 2011

EXTENSIONS

Corrected and extended by Franklin T. Adams-Watters, Apr 16 2011

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 18:54 EDT 2021. Contains 343900 sequences. (Running on oeis4.)