OFFSET
1,1
COMMENTS
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
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)
For all primes p except for p = 3, p^2 + 2 is multiple of 3 (see A061725). - Zak Seidov, Feb 19 2015
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
MATHEMATICA
Select[Prime[Range[500]], PrimeQ[#^2 - 2] &] (* Harvey P. Dale, Sep 20 2011 *)
PROG
(Magma) [ p: p in PrimesUpTo(1100) | IsPrime(p^2-2) ]; // Klaus Brockhaus, Jan 01 2009
(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
(Haskell)
import Data.List (elemIndices)
a062326 = a000040 . a137291
a062326_list = map (a000040 . (+ 1)) $
elemIndices 1 $ map a010051' a049001_list
-- Reinhard Zumkeller, Jul 30 2015
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Reiner Martin, Jul 12 2001
STATUS
approved