OFFSET
1,1
COMMENTS
A generalization of this would be primes p such that (kp)^2+2 is prime. Then k=3 is the only solution. This follows from the fact that k of the form 3m-1 or 3m+1 will give 9m^2 + 6m + 1 + 2, a multiple of 3.
REFERENCES
Garath A. Jones and Mary Jones, Elementary Number Theory, Springer - Verlag London, 1998; p. 35, Exercise 2.17.
MATHEMATICA
lst={}; Do[p=Prime@n; If[PrimeQ@((3*p)^2+2), AppendTo[lst, p]], {n, 6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 11 2009 *)
PROG
(PARI) g(n) = forprime(x=0, n, y=9*x^2+2; if(isprime(y), print1(x", ")))
(Magma) [ p: p in PrimesUpTo(1000) | IsPrime((3*p)^2+2)]; // Vincenzo Librandi, Jan 29 2011
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Mar 19 2007
EXTENSIONS
Entries confirmed by Zak Seidov, Mar 19 2007
STATUS
approved
