The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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 (list; graph; refs; listen; history; text; internal format)
 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 Cf. A208936, A014556, A092749. Cf. A117530, A117531. Sequence in context: A133902 A265823 A305717 * A054708 A112229 A087419 Adjacent sequences:  A208642 A208643 A208644 * A208646 A208647 A208648 KEYWORD nonn AUTHOR M. F. Hasler, Mar 03 2012 STATUS approved

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

Last modified April 17 02:26 EDT 2021. Contains 343059 sequences. (Running on oeis4.)