Frequency of the Prime Numbers

3.4k Views Asked by At

Suppose I took all natural numbers less than or equal to $x$ and I picked one at random. Is there a way that we know of to express the probability that my number is prime in terms of $x$, for all $x$?

For example, for $x=12$, the prime numbers less than or equal to $x$ are $2,3,5,7$ and $11$, so my probability is $5/12$.

1

There are 1 best solutions below

10
On

There is no explicit formula, but the prime number theorem says that as $x$ tends to infinity, there are around $\frac{x}{\ln x}$ primes $≤ x$.

This means that the chance that a random number is prime will be around $\frac{x}{\ln x} \cdot \frac{1}{x} = \frac{1}{\ln x}$.