A prime number is an integer greater than 1 that has no positive divisors other than 1 and itself. The first prime numbers are 2, 3, 5, 7, 11, 13, 17, ...
It is known that no non-constant polynomial function P(n) exists that evaluates to
a prime number for all integers n. But there are some famous quadratic polynomials that
are prime for all non-negative integers less than M (M depends on the polynomial).
You will be given ints A, B and C. Your
method should return the smallest non-negative integer M such that A*M2 + B*M + C is not a prime number.
|