cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A108701 Values of n such that n^2-2 and n^2+2 are both prime.

This page as a plain text file.
%I A108701 #47 Sep 08 2022 08:45:19
%S A108701 3,9,15,21,33,117,237,273,303,309,387,429,441,447,513,561,573,609,807,
%T A108701 897,1035,1071,1113,1143,1233,1239,1311,1563,1611,1617,1737,1749,1827,
%U A108701 1839,1953,2133,2211,2283,2589,2715,2721,2955,3081,3093,3453,3549,3555,3621,3723,3807
%N A108701 Values of n such that n^2-2 and n^2+2 are both prime.
%C A108701 Since x^2 + 2 is divisible by 3 unless x is divisible by 3, all elements are 3 mod 6.
%C A108701 Intersection of A067201 and A028870. - _Robert Israel_, Sep 11 2014
%D A108701 David Wells, Prime Numbers, John Wiley and Sons, 2005, p. 219 (article:'Siamese primes')
%H A108701 Nathaniel Johnston, <a href="/A108701/b108701.txt">Table of n, a(n) for n = 1..8750</a>
%H A108701 Raymond A. Beauregard and E. R. Suryanarayan, <a href="http://www.jstor.org/stable/3620479">Square-plus-two primes</a>, Mathematical Gazette 85(502) 90-1.
%e A108701 21 is on the list since 21^2 - 2 = 439 and 21^2 + 2 = 443 are primes.
%p A108701 select(n -> isprime(n^2-2) and isprime(n^2+2), [seq(6*i+3,i=0..1000)]); # _Robert Israel_, Sep 11 2014
%t A108701 Select[Range[5000], PrimeQ[#^2 - 2] && PrimeQ[#^2 + 2] &] (* _Alonso del Arte_, Sep 11 2014 *)
%o A108701 (Magma) [n: n in [3..3600 by 6] | IsPrime(n^2-2) and IsPrime(n^2+2)];  // _Bruno Berselli_, Apr 15 2011
%o A108701 (PARI) is(n)=isprime(n^2-2)&&isprime(n^2+2) \\ _Charles R Greathouse IV_, Jul 02 2013
%Y A108701 Subsequence of A016945.
%Y A108701 Cf. A016945, A028870, A028873, A038599, A067201, A153974.
%K A108701 nonn,easy
%O A108701 1,1
%A A108701 _John L. Drost_, Jun 19 2005
%E A108701 Terms corrected by _Charles R Greathouse IV_, Sep 11 2014