#36 Prime generators
set by Peter Rowlett
In 1772, mathematician Leonhard Euler noticed that the value of the polynomial x2 + x + 41 is a prime number if you set x=0. He also spotted it is prime if x=1 and it keeps on giving primes for values of x up to 39.
If we use x2 + x + 3 instead, and put x=0, we get 3. Using x=1 gives 5, but the pattern then breaks because x=2 gives 9, which isn’t prime. So, x2 + x + 3 generates a sequence of two primes.
How many…