%I #20 Sep 08 2022 08:45:40
%S 0,2,4,8,10,14,16,20,26,28,34,38,40,44,50,56,58,64,68,70,76,80,86,94,
%T 98,100,104,106,110,124,128,134,136,146,148,154,160,164,170,176,178,
%U 188,190,194,196,208,220,224,226,230,236,238,248,254,260,266,268,274,278
%N Numbers n such that n + 3 is prime.
%H G. C. Greubel, <a href="/A154115/b154115.txt">Table of n, a(n) for n = 1..2000</a>
%F a(n) = A086801(n+1). - _R. J. Mathar_, May 09 2010
%e a(2) = 2 since (2 + 2)^2 - (2 + 1)^2 - 2 = 5.
%p A154115 := proc(n) ithprime(n+1)-3 ; end proc: # _R. J. Mathar_, May 09 2010
%t a[n_]:=(n+2)^2-(n+1)^2-n;lst={};Do[If[PrimeQ[a[n]],AppendTo[lst,n]],{n,6!}];lst
%t Select[Range[0,300],PrimeQ[(#+2)^2-(#+1)^2-#]&] (* _Harvey P. Dale_, Nov 06 2013 *)
%t Prime[Range[2,100]]-3 (* _Harvey P. Dale_, Jul 15 2017 *)
%o (Magma) [n: n in [0..500] | IsPrime((n+2)^2-(n+1)^2-n)] # _Vincenzo Librandi_, Nov 26 2010
%o (PARI) is(n)=isprime(n+3) \\ _Charles R Greathouse IV_, Sep 02 2016
%Y Cf. A140719, A005097, A154111, A154112, A154113.
%Y Cf. A067076 (a(n-1)/2).
%K nonn,easy
%O 1,2
%A _Vladimir Joseph Stephan Orlovsky_, Jan 04 2009
%E New name based on a comment by _Franklin T. Adams-Watters_, Jan 30 2009