Question: using SageMAth I dont understand what is the question asking to do and neither what comands should I use Let (2) be the number of

using SageMAth

I dont understand what is the question asking to do and neither what comands should I useusing SageMAth I dont understand what is the question asking to do

Let (2) be the number of prime numbers less than or equal to z. The prime number theorem asserts that Edit T(2) lim- 2700 2log = 1. (Throughout this course, log will mean the natural logarithm, also known as In.) a. Test this prediction by computing the ratio (2)/(x/log(x)) for N = 105, 106, 107, 108, 109, 10-0. Make sure your answer appears as a floating-point number rather than a rational number. (Hint: Sage provides a way to compute (2) without enumerating all of the primes; you don't need to understand how this works.) In [ ]: b. Let N be a large positive integer chosen at random". Let p be the smallest prime that is larger than N. Based on the prime number 18 theorem, how large would you expect the difference N - p to be on average, and why? (This can be a fairly crude analysis; I basically want you to guess the mean to the right order of magnitude, not necessarily with the right constant factor.) In [ ]: c. For each of x = 105, 1010, 1015, choose 500 random integers N E [X, 2x), compute the value p- x where p is the smallest prime that i30 larger than 2, and make a histogram plot of the result. (More precisely, write code whose output produces these plots.) In ]. Let (2) be the number of prime numbers less than or equal to z. The prime number theorem asserts that Edit T(2) lim- 2700 2log = 1. (Throughout this course, log will mean the natural logarithm, also known as In.) a. Test this prediction by computing the ratio (2)/(x/log(x)) for N = 105, 106, 107, 108, 109, 10-0. Make sure your answer appears as a floating-point number rather than a rational number. (Hint: Sage provides a way to compute (2) without enumerating all of the primes; you don't need to understand how this works.) In [ ]: b. Let N be a large positive integer chosen at random". Let p be the smallest prime that is larger than N. Based on the prime number 18 theorem, how large would you expect the difference N - p to be on average, and why? (This can be a fairly crude analysis; I basically want you to guess the mean to the right order of magnitude, not necessarily with the right constant factor.) In [ ]: c. For each of x = 105, 1010, 1015, choose 500 random integers N E [X, 2x), compute the value p- x where p is the smallest prime that i30 larger than 2, and make a histogram plot of the result. (More precisely, write code whose output produces these plots.) In ]

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 Databases Questions!