I'm Stuck on the second part of ps1-- I don't understand e**n. forgive my ignorance but what is being asked. what is "e" and why are we multiplying primes together? are we saying that the product of the primes (2*3*5) < 7**7 but those numbers get closer as "n" gets bigger?
I am not a math pro but, e is a mathematical constant approximately equal to 2.718 (you can find more on wikipedia). e**n means e raised to the power of n (or n times e), where n is a sufficiently large number (let's say 10000 or even bigger. This is just an example though). The pdf pset1 explains the result of a number theory (don't know whose theory). The primes are being multiplied because the theory's result says that (PRODUCT of primes less than n) divided by (e**n) will get closer to 1 as n increases. However, dealing with such big numbers can be challenging. This has been made doable in python by converting the above statement to log form (described in the pdf). That way one wouldn't have to worry about the humongous numbers resulting from multiplication of primes or calculating e**n (both of which are very very large numbers). Hope this helps.
It may be helpful to note that the natural log of e is 1, log(e)=1. Hence the comparison of the sum of log(p) over the primes, p<n, to n. For more information on the theorem itself check out - http://mathworld.wolfram.com/PrimeNumberTheorem.html.
a cool article on understanding e. Also, to complete the problem, e will not show up literally (you won't have to calculate e in your equations) anywhere in your code, but it is important to understand it and also understand the log function used here is base e, or also ln as you may have seen on your graphing calculator. http://betterexplained.com/articles/an-intuitive-guide-to-exponential-functions-e/
Join our real-time social learning platform and learn together with your friends!