Question: a) Let P(n) = n +n +41. Write a computer program (in Java, Matlab or Python) which finds the smallest positive counterexample for the
a) Let P(n) = n +n +41. Write a computer program (in Java, Matlab or Python) which finds the smallest positive counterexample for the statement: "If n is a positive integer then P(n) is a prime number". b) Similar to a) find the smallest counterexample for the polynomial: g(x) = x-79x+1601.
Step by Step Solution
3.37 Rating (156 Votes )
There are 3 Steps involved in it
Python import sympy def isprimenum if num 2 return False return sympyisprimenum def findsm... View full answer
Get step-by-step solutions from verified subject matter experts
