# Quadratic that yields the longest prime sequence?

The quadratic $n^2+n+41$ yields prime numbers all the way up to $n=40$ before it fails (pretty cool!).

My question is: Do you know of a quadratic that can 'last even longer'?

• Note that the Green-Tao theorem tells us that there are arbitrarily long arithmetic progressions in the primes, which would relate to the linear case. – Mark Bennet Nov 17 '14 at 11:53
• Also, to add to this, is it just a coincidence that the number of positive integer terms that this quadratic lasts HAPPENS to be one less than the constant term? – Trogdor Nov 17 '14 at 11:54
• Not really a conincidence. It's obvious that $n^2+n+41$ is not prime when $n=41$. – TonyK Nov 17 '14 at 11:55
• $n^2+n+a$ fails to be prime for $n=a-1$: $(a-1)^2+(a-1)+a=a^2$ – Hagen von Eitzen Nov 17 '14 at 12:03
• @Trogdor Actually, this is closely related to the fact that $e^{\pi\sqrt{4\cdot 41-1}}$ is very close to an integer! – Hagen von Eitzen Nov 17 '14 at 12:07

$$36n^2-810n+2753$$
is prime for $n\le44$ (source).
$$n^2-81n+1681$$ is prime for all natrual numbers $\le 80$. (This is of course an unfair answer)