On PS1 Probelm 2, What exactly is the ratio between the prime numbers and the log of those numbers? Im just not understanding what exactly the ratio of those 2 numbers are. I.E I can get the program to display Prime number 11 and and the sum of the log of the prime number (1.04139) but I dont get what hes asking when he says "and the ratio of these two quantities". Thanks for all the help. Answers to previous questions have helped out alot.
You are supposed to find that the ratio gets close to being one. You need to use a large number. I used 1009.
It's just the ratio (division) between the sum of the logs of the primes by n, a given number, hardcoded in the source, or accepting it as input. This ratio approach 1 as n grow large, albeit not monotonically, as stated in the pset pdf.
Join our real-time social learning platform and learn together with your friends!