Lably
Skip to content

Prime number theorem

Characterization of how many integers are prime

  • 21 min read
  • 12 chapters

Related on Lably

Through Mathematics, Prime number and Natural logarithm

The first such distribution found is π(N) ~ ⁠N/log(N)⁠, where π(N) is the prime-counting function (the number of primes less than or equal to N) and log(N) is the natural logarithm of N. This means that for large enough N, the probability that a random integer not greater than N is prime is very close to 1 / log(N). In other words, the average gap between consecutive prime numbers among the first N integers is roughly log(N). Consequently, a random integer with at most 2n digits (for large enough n) is about half as likely to be prime as a random integer with at most n digits. For example, among the positive integers of at most 1000 digits, about one in 2300 is prime (log(101000) ≈ 2302.6), whereas among positive integers of at most 2000 digits, about one in 4600 is prime (log(102000) ≈ 4605.2).

Statement

Let π(x) be the prime-counting function defined to be the number of primes less than or equal to x, for any real number x. For example, π(10) = 4 because there are four prime numbers (2, 3, 5 and 7) less than or equal to 10. The prime number theorem then states that x / log x is a good approximation to π(x) (where log here means the natural logarithm), in the sense that the limit of the quotient of the two functions π(x) and x / log x as x increases without bound is 1:

limx→∞π(x)[xlog⁡(x)]=1,

known as the asymptotic law of distribution of prime numbers. Using asymptotic notation this result can be restated as

π(x)∼xlog⁡x.

This notation (and the theorem) does not say anything about the limit of the difference of the two functions as x increases without bound. Instead, the theorem states that x / log x approximates π(x) in the sense that the relative error of this approximation approaches 0 as x increases without bound.

The prime number theorem is equivalent to the statement that the nth prime number pn satisfies

pn∼nlog⁡(n),

the asymptotic notation meaning, again, that the relative error of this approximation approaches 0 as n increases without bound. For example, the 2×1017th prime number is 8512677386048191063, and (2×1017)log(2×1017) rounds to 7967418752291744388, a relative error of about 6.4%.

On the other hand, the following asymptotic relations are logically equivalent:

limx→∞π(x)log⁡xx=1, andlimx→∞π(x)log⁡π(x)x=1.

As outlined below, the prime number theorem is also equivalent to

limx→∞ϑ(x)x=limx→∞ψ(x)x=1,

where ϑ and ψ are the first and the second Chebyshev functions respectively, and to

limx→∞M(x)x=0,

where M(x)=∑n≤xμ(n) is the Mertens function.

Sign in to keep reading

11 more chapters are free with a Lably account.

More in Discrete mathematics