|
|
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
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|