Question: Sagemath programming question Problem 3: Mersenne primes Grading criteria: correctness of explanation and code. 3a. A Mersenne prime is a prime number of the form
Sagemath programming question

Problem 3: Mersenne primes Grading criteria: correctness of explanation and code. 3a. A Mersenne prime is a prime number of the form 2 -1 where p is itself prime. (Note that these are the only possible primes of the form 2h- 1 where n is a positive integer). They are called this because Marin Mersenne was the first person to attempt to list these primes systematicaly: he claimed that for p 257, 21,-1 is prime if and only if PE 12,3,5,7,13, 17, 19,31,67, 127,257. This list turns out to be incorrect; write Sage code to compute the correct list. nyour code goes hee 3b. On January 3, 2018, the Great Internet Mersenne Prime Search announced that 2723 is the 50th known Mersenne prime.' Why didn't they announce that it is the "50th Mersenne prime"? Type Markdown and LaTex 2 3c. The little Fermat theorem states that if p is prime, then 2 -1 1 mod p This can be used as a test for primality the Fermat test which has no fa se negatives, but does have some false positives see part d Explain why the following code cannot be used to apply the Fermat test to the number p 22170 then give an alternate approach that does work. p2*21701 - 1 print (2^ (p-1) % p> # This won't work (your explanation goes here) In [ ]: | # your better code goes here 3d. Find all integers up to 1000 which are false positives for the Fermat test. These include Carmichael numbers, in case you want to read more about this phenomenon. In [ # your code goes here Problem 3: Mersenne primes Grading criteria: correctness of explanation and code. 3a. A Mersenne prime is a prime number of the form 2 -1 where p is itself prime. (Note that these are the only possible primes of the form 2h- 1 where n is a positive integer). They are called this because Marin Mersenne was the first person to attempt to list these primes systematicaly: he claimed that for p 257, 21,-1 is prime if and only if PE 12,3,5,7,13, 17, 19,31,67, 127,257. This list turns out to be incorrect; write Sage code to compute the correct list. nyour code goes hee 3b. On January 3, 2018, the Great Internet Mersenne Prime Search announced that 2723 is the 50th known Mersenne prime.' Why didn't they announce that it is the "50th Mersenne prime"? Type Markdown and LaTex 2 3c. The little Fermat theorem states that if p is prime, then 2 -1 1 mod p This can be used as a test for primality the Fermat test which has no fa se negatives, but does have some false positives see part d Explain why the following code cannot be used to apply the Fermat test to the number p 22170 then give an alternate approach that does work. p2*21701 - 1 print (2^ (p-1) % p> # This won't work (your explanation goes here) In [ ]: | # your better code goes here 3d. Find all integers up to 1000 which are false positives for the Fermat test. These include Carmichael numbers, in case you want to read more about this phenomenon. In [ # your code goes here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
