Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 useimage text in transcribed

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

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899