Turkish Project Euler Question 27 Quadratic Prime Numbers

Turkish Project Euler Question 27 Quadratic Prime Numbers

Turkish Project Euler Question 27 Quadratic Prime Numbers

Euler found a perfect quadratic formula.
n²+n+41
Apparently, the formula produces 49 prime numbers for 0≤n≤39. But when n = 40, the expression is divisible by 41. When n = 41, it is obviously divisible by 41.

It has been discovered that the incredible formula n² -79n +1601 also produces 80 prime numbers between 0 and 79. The product of the coefficients -79 and 1601 is -126479.

Considering the quadratic equation in the form n²+an+b, the absolute value of a is less than 1000 and the absolute value of b is less than or equal to 1000. |n| gives the modulus / absolute value of the n values.

Starting from n = 0, find the product of the coefficients a and b for the quadratic equation that produces the maximum number of consecutive prime numbers for consecutive values of n.