The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A108151 a(n) = n^2 + 3*n + 1 if prime or 0 if composite. 0

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 11 16:25 EDT 2024. Contains 373315 sequences. (Running on oeis4.)