In 1772, the Swiss mathematician Leonhard Euler (pronounced “oiler”) noticed that certain polynomial functions tended to produce a higher proportion of prime numbers than expected. For example, the polynomial n2 + n + 41 produces primes for the first forty natural numbers (0…30.) This, however, is not necessarily the polynomial of the form an2 + bn + c with a=1 that produces the largest set of primes over the early natural numbers.
For your chance at this week’s $50 ThinkGeek Gift Certificate, determine the set of coefficients for the polynomial of the form f(n) = an2 + bn + c with a=1 that has the longest run of prime numbers over the natural numbers (starting with 0.) Please limit your range of b and c from -5000 to +5000, inclusive, and please take a moment or two to “brag” and describe how you went about getting your answer including any shrewd optimizations you made or observations you, um, observed. As always, please send your responses via email to GeekDad Central.