Start with the implementation of the Sieve of Erastosthenes: The program to comp
ID: 3534357 • Letter: S
Question
Start with the implementation of the Sieve of Erastosthenes:
The program to compute pi(n), which is the number of prime numbers < n. It will print out pi(n) for values of n that are powers of 10 from 10 to 10^8.
For example, pi(2) = 1 and pi(10) = 4. I
Output will be in four columns.
1) The first will contain n.
2) The second will contain pi(n)
3) The third will contain n/ln(n)
4) The fourth will contain the ration of pi(n) to n/ln(n).
An extremely important theorem of number theory says that as n goes to pi, the ratio of pi(n) to n/ln(n) converges to 1.