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 #15 Feb 22 2024 02:22:33
%S 5,11,19,29,41,0,71,89,109,131,0,181,0,239,271,0,0,379,419,461,0,0,
%T 599,0,701,0,811,0,929,991,0,0,0,1259,0,0,1481,1559,0,1721,0,0,1979,
%U 2069,2161,0,2351,0,2549,0
%N a(n) = n^2 + 3*n + 1 if prime or 0 if composite.
%e 1^2+3*1+1 = 5 prime so a(1) = 5.
%e 2^2+3*2+1 = 11 prime so a(2) = 11.
%e 6^2+3*6+1 = 55 = 5*11 composite so a(6) = 0.
%t Table[t=n^2+3n+1;If[PrimeQ[t],t,0],{n,50}] (* _James C. McMahon_, Feb 21 2024 *)
%Y Cf. A028387.
%K nonn,less
%O 1,1
%A _Pierre CAMI_, Jun 06 2005