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.

A062326 Primes p such that p^2 - 2 is also prime.

This page as a plain text file.
%I A062326 #50 Feb 04 2024 01:13:29
%S A062326 2,3,5,7,13,19,29,37,43,47,61,71,89,103,107,127,131,139,173,191,211,
%T A062326 223,233,239,257,293,313,337,359,421,443,449,467,491,523,541,569,587,
%U A062326 607,653,677,719,727,733,743,751,757,761,797,811,863,881,1013,1021
%N A062326 Primes p such that p^2 - 2 is also prime.
%C A062326 When p and p^2 - 2 are both prime, the fundamental solution of the Pell equation x^2 - n*y^2 = 1, for n = p^2 - 2, is x = p^2 - 1 and y = p. See A109748 for the case of n and x both prime. - _T. D. Noe_, May 19 2007
%C A062326 3 is the only prime p such that p^2 + 2 and p^2 - 2 are both primes. - _Jaroslav Krizek_, Nov 25 2013 (note that p^2 + 2 is composite for all primes p >= 5. - _Joerg Arndt_, Jan 10 2015)
%C A062326 For all primes p except for p = 3, p^2 + 2 is multiple of 3 (see A061725). - _Zak Seidov_, Feb 19 2015
%H A062326 Amiram Eldar, <a href="/A062326/b062326.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe)
%t A062326 Select[Prime[Range[500]], PrimeQ[#^2 - 2] &] (* _Harvey P. Dale_, Sep 20 2011 *)
%o A062326 (Magma) [ p: p in PrimesUpTo(1100) | IsPrime(p^2-2) ]; // _Klaus Brockhaus_, Jan 01 2009
%o A062326 (PARI) { n=0; forprime (p=2, 5*10^5, if (isprime(p^2 - 2), write("b062326.txt", n++, " ", p); if (n==1000, break)) ) } \\ _Harry J. Smith_, Aug 05 2009
%o A062326 (Haskell)
%o A062326 import Data.List (elemIndices)
%o A062326 a062326 = a000040 . a137291
%o A062326 a062326_list = map (a000040 . (+ 1)) $
%o A062326                elemIndices 1 $ map a010051' a049001_list
%o A062326 -- _Reinhard Zumkeller_, Jul 30 2015
%Y A062326 Cf. A049002 (p^2-2).
%Y A062326 Cf. A137291, A010051, A004901, A000040.
%K A062326 nonn,nice
%O A062326 1,1
%A A062326 _Reiner Martin_, Jul 12 2001