The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A108701 Values of n such that n^2-2 and n^2+2 are both prime. 16
3, 9, 15, 21, 33, 117, 237, 273, 303, 309, 387, 429, 441, 447, 513, 561, 573, 609, 807, 897, 1035, 1071, 1113, 1143, 1233, 1239, 1311, 1563, 1611, 1617, 1737, 1749, 1827, 1839, 1953, 2133, 2211, 2283, 2589, 2715, 2721, 2955, 3081, 3093, 3453, 3549, 3555, 3621, 3723, 3807 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Since x^2 + 2 is divisible by 3 unless x is divisible by 3, all elements are 3 mod 6.
Intersection of A067201 and A028870. - Robert Israel, Sep 11 2014
REFERENCES
David Wells, Prime Numbers, John Wiley and Sons, 2005, p. 219 (article:'Siamese primes')
LINKS
Raymond A. Beauregard and E. R. Suryanarayan, Square-plus-two primes, Mathematical Gazette 85(502) 90-1.
EXAMPLE
21 is on the list since 21^2 - 2 = 439 and 21^2 + 2 = 443 are primes.
MAPLE
select(n -> isprime(n^2-2) and isprime(n^2+2), [seq(6*i+3, i=0..1000)]); # Robert Israel, Sep 11 2014
MATHEMATICA
Select[Range[5000], PrimeQ[#^2 - 2] && PrimeQ[#^2 + 2] &] (* Alonso del Arte, Sep 11 2014 *)
PROG
(Magma) [n: n in [3..3600 by 6] | IsPrime(n^2-2) and IsPrime(n^2+2)]; // Bruno Berselli, Apr 15 2011
(PARI) is(n)=isprime(n^2-2)&&isprime(n^2+2) \\ Charles R Greathouse IV, Jul 02 2013
CROSSREFS
Subsequence of A016945.
Sequence in context: A276967 A114271 A137164 * A064539 A029482 A174786
KEYWORD
nonn,easy
AUTHOR
John L. Drost, Jun 19 2005
EXTENSIONS
Terms corrected by Charles R Greathouse IV, Sep 11 2014
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 May 20 13:06 EDT 2024. Contains 372714 sequences. (Running on oeis4.)