Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #21 Sep 08 2022 08:46:07
%S 2,7,11,17,29,35,37,43,53,55,65,73,79,83,97,115,119,125,133,137,155,
%T 161,169,187,191,205,209,233,251,263,269,271,277,281,287,295,335,343,
%U 359,361,379,385,389,395,407,413,425,433,451,461,475,479,493,505,511,521,529,541,559,577
%N Numbers n such that (n^2 + 2)/3 is prime.
%C If n == 1 mod 3, then (n - 1)/3 is in A086285.
%H Robert Israel, <a href="/A240878/b240878.txt">Table of n, a(n) for n = 1..10000</a>
%e (2^2 + 2)/3 = 6/3 = 2, which is prime, so 2 is in the sequence.
%e (7^2 + 2)/3 = 51/3 = 17, which is prime, so 7 is in the sequence.
%e (11^2 + 2)/3 = 123/3 = 41, which is prime, so 11 is in the sequence.
%e (13^2 + 2)/3 = 171/3 = 57 = 3 * 19, which is not prime, so 13 is not in the sequence.
%p N:= 10000; # to get all terms <= 3 N + 2
%p A240878:= select(t -> isprime((t^2+2)/3),{seq(seq(3*i+j,j=1..2),i=0..N)}):
%t Select[Range[500], PrimeQ[(#^2 + 2)/3] &] (* _Alonso del Arte_, Apr 13 2014 *)
%o (Magma) [2] cat [n: n in [4..600] | IsPrime((n^2 + 2) div 3)]; // _Vincenzo Librandi_, Jul 01 2014
%o (PARI) is(n)=isprime((n^2+2)/3) \\ _Charles R Greathouse IV_, Jun 06 2017
%Y Cf. A086285.
%K nonn,easy
%O 1,1
%A _Robert Israel_, Apr 13 2014