OFFSET
1,2
COMMENTS
a(n) > 0 by definition, and a(n) > 1 iff n is a twin prime; a(n) would be zero for composite n if "prime(n)" was replaced by n.
Euler's original "prime producing polynomial" was P = x^2 - x + 41; changing the sign increases the prime production length by 1.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Shaoji Xu, On Euler Polynomials and Rabinowitsch Polynomials, International Journal of Algebra, Vol. 6, 2012, no. 3, 123 - 134.
MAPLE
A208936:= proc(n) local N, r;
N:= ithprime(n);
for r from 1 do
if not isprime(r^2+r+N) then return(r) end if
end do
end proc; # Robert Israel, Feb 11 2013
PROG
(PARI) a(n)={n=prime(n); for( x=1, 1e9, isprime(x^2+x+n) | return(x))}
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Mar 03 2012
STATUS
approved