Since we don't have a straight line yet the next plot is of the inverse of the fraction of prime numbers. Bingo! We have a straight line. A quick check of wikipedia (Distribution of Prime Numbers. Know your search terms!) reveals that I have just empirically rediscovered the Prime Number Theorem. Typical engineer.
That theorem defines pi(n) as the number of numbers that are prime below n. The fraction of numbers that are prime that I was trying to figure out is pi(n)/n.
pi(n) ~ n/ln (n)
pi(n)/n ~ 1/ ln(n)
pi(n)/n ~ 1/ ln(n)
My plot is the inverse of the fraction on a log which gives me my straight line ln(n). The chance of a randomly selected number being prime is 1/ ln(n).
No comments:
Post a Comment