Question: Using sagemaths jupyter notebook language code solve the following: a ) You can use the function primes ( a , b ) to find all

Using sagemath"s jupyter notebook language code solve the following:
a) You can use the function primes(a,b) to find all prime numbers p such that (a,b)677?kpkppap.If you want to put these primes in a list, you can use the
command list(primes(a,b). Create a list called listofprimes that contains all the prime numbers between 15 and 1000. How many numbers are
in this list? What is the 12th number in this list (remember, this is the number with index 11). What is the index of the prime 677?
b) Set ktobe a random integer between 2 and 16. For each prime plistofprimes Compute the remainder we get from the Euclidean division ofkpby
p, and put these values into a list. What do you notice?
Remark: If you do everything correctly, then what you will observe is a consequence of "Fermat's Little Theorem".
Using sagemath"s jupyter notebook language code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!