# Infinity of primes — proof using calculus

Let us look at a proof that the number of primes is infinite — a proof that uses only elementary calculus.

Let $\pi (x) = \# \{ p \leq x: p \in P\}$ be the number of primes that are less than or equal to the real number x. (Note: here P is the set of primes). We number the primes $P = \{ p_{1}, p_{2}, p_{3, \ldots}\}$ in increasing order. Consider the natural logarithm $\log {x}$ defined as $\log {x}=\int_{1}^{x}\frac{1}{t}dt$.

Now we compare the area below the graph of $f(t)=\frac{1}{t}$ with an upper step function. Thus, for $n \leq x < n+1$ we have

$\log {x} \leq 1+\frac{1}{2}+\frac{1}{3}+ \ldots + \frac{1}{n-1}+\frac{1}{n} \leq \Sigma \frac{1}{m}$ where the sum extends over all $m \in N$ which have only prime divisors $p \leq x$.

Since every such m can be written in a unique way as a product of the form $\Pi_{p \leq x}p^{k_{p}}$, we see that the last sum is equal to

$\Pi_{{p \in P}_{p \leq x}}(\Sigma_{k \geq 0}\frac{1}{p^{k}})$

The inner sum is a geometric series with ratio $\frac{1}{p}$, hence,

$\log {x} \leq \Pi_{{p \in P}_{p \leq x}}\frac{1}{1-\frac{1}{p}}=\Pi_{{p \in P}_{p \leq x}}\frac{p}{p-1}=\Pi_{k=1}^{\pi(x)}\frac{p_{k}}{p_{k}-1}$

Now, clearly $p_{k} \geq k+1$ and thus

$\frac{p_{k}}{p_{k}-1}=1+ \frac{1}{p_{k}-1} \leq 1 + \frac{1}{k}=\frac{k+1}{k}$

and therefore,

$\log {x}\leq \Pi_{k=1}^{\pi(x)}\frac{k+1}{k}=\pi(x)+1$.

Everybody knows that $\log {x}$ is not bounded, so we conclude that $\pi(x)$ is unbounded as well, and so there are infinitely many primes. QED.

Ref: Proofs from THE BOOK (Martin Aigner and Gunter M. Ziegler) (Third Edition).