%I #39 Mar 16 2017 04:17:41
%S 0,1,3,9,15,21,33,39,45,57,81,99,105,111,117,123,147,171,219,225,237,
%T 243,249,255,273,297,303,309,321,345,351,363,369,375,387,417,423,429,
%U 441,447,453,477,501,513,549,555,561,573,603,609,651,675,681,699,711,753
%N Numbers k such that k^2 + 2 is prime.
%C All terms > 1 are divisible by 3. - _Robert Israel_, Sep 05 2014
%H T. D. Noe, <a href="/A067201/b067201.txt">Table of n, a(n) for n=1..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Near-SquarePrime.html">Near-Square Prime</a>
%p select(t -> isprime(t^2+2), [0,1,seq(3*i,i=1..1000)]); # _Robert Israel_, Sep 05 2014
%t lst={};Do[If[PrimeQ[n^2+2], AppendTo[lst, n]], {n, 3*10^2}];lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 21 2008 *)
%t Join[{0, 1}, Select[Range[3, 1000, 6], PrimeQ[#^2 + 2] &]] (* _Zak Seidov_, Jan 30 2014 *)
%o (PARI) select(n -> isprime(n^2+2),[1..500]) \\ _Edward Jiang_, Sep 05 2014
%Y Equals 6*A056900(n-2) + 3, n>1.
%Y Cf. A106571, A040976.
%Y Other sequences of the type "Numbers k such that k^2 + i is prime": A005574 (i=1), this sequence (i=2), A049422 (i=3), A007591 (i=4), A078402 (i=5), A114269 (i=6), A114270 (i=7), A114271 (i=8), A114272 (i=9), A114273 (i=10), A114274 (i=11), A114275 (i=12).
%K nonn
%O 1,3
%A _Benoit Cloitre_, Feb 19 2002