Primes and Probabilities

When I was in grade school learning about primes, I would ask myself: How many primes are there? If I pick a number at random, will it be prime?

The first question has been known for a long time. There are infinitely many primes, and the proof is simple.

Theorem. No finite set of integers contains all primes.
Proof. Let $p_1,p_2,\ldots,p_k$ be primes, and let $n=p_1p_2\cdots p_k+1$. Since no prime divides $1$, this means that $p_i\nmid n$ for $i=1,2,\ldots,k$, and so any prime factor of $n$ is not among those primes which we started with. QED

The second question, however, is not so simple. To begin, we introduce one of the most beautiful results in Analytic Number Theory, the Prime Number Theorem.

Letting $\pi\left(x\right)$ denote the number of primes $p\leq x$, we obtain the following asymptotic result.

Theorem. $\pi\left(x\right)\sim\frac{x}{\log x}$. In more words, we have that
\[
\lim_{x\to\infty} \frac{\pi\left(x\right)}{x/\log x}=1.
\]

I refer the reader to the books of Apostol [1] and Iwaniec/Kowalski [2] for proofs.

From this, it makes sense to talk about the probability that a “random” integer is prime (technically, we will talk about the density of the prime numbers).

Consider the set of integers in the interval $\left[1,N\right]$, $0<N\in\mathbb{N}$. We may put a uniform distribution on this set, that is, each integer has a probability $\frac{1}{N}$ assigned to it. Then, the probability that an integer in this set is prime is $\frac{\pi\left(N\right)}{N}$. By the Prime Number Theorem, this gives us the following result:
\[
\lim_{N\to\infty}\frac{\pi\left(N\right)}{N}=\lim_{N\to\infty}\frac{1}{\log N}=0
\]

Theorem. The density of the prime numbers in the positive integers is $0$. In probabilistic terms, the probability that an integer is prime is $0$.

So, now, we may answer my second question. The answer is almost surely no.

References.
[1] Apostol, Tom M. Introduction to Analytic Number Theory. New York: Springer-Verlag, 1976.

[2] Iwaniec, Henryk, and Emmanuel Kowalski. Analytic Number Theory. Providence, R.I.: American Mathematical Society, 2004.

This entry was posted in Analytic Number Theory. Bookmark the permalink.