%I
%S 3,5,7,11,13,19,37,41,73,79,83,101,103,107,139,149,151,167,191,227,
%T 233,251,269,311,337,443,457,479,499,503,521,541,601,613,647,673,761,
%U 811,829,863,877,883,887,907,919,941,983,997
%N Primes p such that (3p)^2 + 2 is prime.
%C 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 3m1 or 3m+1 will give 9m^2 + 6m + 1 + 2, a multiple of 3.
%D Garath A. Jones and Mary Jones, Elementary Number Theory, Springer  Verlag London, 1998; p. 35, Exercise 2.17.
%t lst={}; Do[p=Prime@n; If[PrimeQ@((3*p)^2+2),AppendTo[lst,p]],{n,6!}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 11 2009 *)
%o (PARI) g(n) = forprime(x=0,n,y=9*x^2+2;if(isprime(y),print1(x",")))
%o (MAGMA) [ p: p in PrimesUpTo(1000)  IsPrime((3*p)^2+2)] // _Vincenzo Librandi_, Jan 29 2011
%K easy,nonn
%O 1,1
%A _Cino Hilliard_, Mar 19 2007
%E Entries confirmed by _Zak Seidov_, Mar 19 2007
