Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 3: Mersenne primes Grading criteria: mathematical and code correctness. A Mersenne prime is a prime number of the form Mp = 2P 1 where
Problem 3: Mersenne primes Grading criteria: mathematical and code correctness. A Mersenne prime is a prime number of the form Mp = 2P 1 where p is itself a prime. (Note that 2" 1 cannot be prime if n is composite, because 2ab 1 is divisible by 24 1.) As of this writing, exactly 51 Mersenne primes are known? it is unknown whether or not there are infinitely many. a. Define a function that, given a prime number p, applies the Fermat test for the base 3 to the number Mp. Then use this to confirm that M41 is not prime. In [ ]: b. What happens if you use the base 2 instead? Try it and explain the result. In [ ]: Problem 3: Mersenne primes Grading criteria: mathematical and code correctness. A Mersenne prime is a prime number of the form Mp = 2P 1 where p is itself a prime. (Note that 2" 1 cannot be prime if n is composite, because 2ab 1 is divisible by 24 1.) As of this writing, exactly 51 Mersenne primes are known? it is unknown whether or not there are infinitely many. a. Define a function that, given a prime number p, applies the Fermat test for the base 3 to the number Mp. Then use this to confirm that M41 is not prime. In [ ]: b. What happens if you use the base 2 instead? Try it and explain the result. In [ ]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started