login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A208645
Least x>0 such that x^2+x+n is not prime.
1
2, 4, 1, 2, 1, 4, 1, 1, 1, 2, 1, 10, 1, 1, 1, 2, 1, 16, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 40, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 6, 1, 1, 1, 2, 1, 1, 1, 1
OFFSET
0,1
COMMENTS
By definition, a(n)>0 for all n, and a(n)>1 if n+2 is prime.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
EXAMPLE
a(0)=2 since 1^2+1+0=2 is prime, but 2^2+2+0=6 is composite.
a(1)=4 since 1^2+1+1=2, 2^2+2+1=7 and 3^2+3+1=13 are prime, but 4^2+4+1=21 is composite.
MATHEMATICA
lx[n_]:=Module[{x=1}, While[PrimeQ[x^2+x+n], x++]; x]; Array[lx, 90, 0] (* Harvey P. Dale, Aug 14 2013 *)
PROG
(PARI) a(n)=for( x=1, n+3, isprime(x^2+x+n) | return(x))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Mar 03 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 21 14:48 EDT 2024. Contains 376087 sequences. (Running on oeis4.)