Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions