Prime numbers are the atoms of arithmetic: every whole number greater than 1 is built by multiplying primes together in exactly one way. Yet the primes themselves seem to appear almost at random, and the deepest question about their pattern, the Riemann Hypothesis, has been unsolved since 1859. This article takes you from the basic facts about primes to the edge of modern research.
What Makes a Number Prime?
A prime is a whole number greater than 1 whose only positive divisors are 1 and itself. The first few are
$$ 2,\ 3,\ 5,\ 7,\ 11,\ 13,\ 17,\ 19,\ 23,\ 29,\ \ldots $$
Numbers like \( 12 = 2^2 \times 3 \) are composite. The Fundamental Theorem of Arithmetic says every integer greater than 1 factorises into primes uniquely, apart from the order of the factors. This is why primes are the building blocks of number theory, and why modern cryptography (such as RSA, used in online banking) relies on how hard it is to factorise very large numbers.
Worked Example 1: Testing whether 221 is prime
Step 1. We only need to test prime divisors up to \( \sqrt{221} \approx 14.87 \), because if \( 221 = ab \) with both factors larger than 14.87, the product would exceed 221.
Step 2. Test the primes 2, 3, 5, 7, 11, 13:
- 221 is odd, so not divisible by 2.
- Digit sum \( 2 + 2 + 1 = 5 \), not divisible by 3.
- It does not end in 0 or 5, so not divisible by 5.
- \( 221 \div 7 = 31.57\ldots \), not a whole number.
- \( 221 \div 11 = 20.09\ldots \), not a whole number.
- \( 221 \div 13 = 17 \) exactly.
Step 3. So \( 221 = 13 \times 17 \) is composite. This "trial division up to the square root" method works for any number, though it becomes slow for numbers with hundreds of digits.
Euclid: There Are Infinitely Many Primes
Around 300 BC, Euclid of Alexandria proved in his Elements that the primes never run out. His argument is one of the most elegant in mathematics.
Suppose there were only finitely many primes \( p_1, p_2, \ldots, p_n \). Form
$$ N = p_1 p_2 \cdots p_n + 1. $$
Dividing \( N \) by any \( p_k \) leaves remainder 1, so none of the listed primes divides \( N \). But \( N \) must have some prime factor, so there is a prime missing from the list, a contradiction.
Worked Example 2: Euclid's construction in action
Step 1. Take the first six primes and multiply them:
$$ 2 \times 3 \times 5 \times 7 \times 11 \times 13 = 30{,}030 $$
Step 2. Add 1 to get \( N = 30{,}031 \).
Step 3. Factorise: \( 30{,}031 = 59 \times 509 \).
Step 4. Interpret. \( N \) is not itself prime, a common misunderstanding of Euclid's proof. But its prime factors 59 and 509 are both new primes not in the original list, exactly as the proof guarantees.
How Are the Primes Spread Out?
Primes get rarer as numbers grow. Let \( \pi(x) \) denote the number of primes up to \( x \):
| \( x \) | \( \pi(x) \) | \( x / \ln x \) | Ratio |
|---|---|---|---|
| 100 | 25 | 21.7 | 1.151 |
| 1,000 | 168 | 144.8 | 1.161 |
| 1,000,000 | 78,498 | 72,382 | 1.085 |
Around 1792–93, the teenage Carl Friedrich Gauss noticed from prime tables that the density of primes near \( x \) is roughly \( 1/\ln x \). This led to the Prime Number Theorem, proved independently by Jacques Hadamard and Charles de la Vallée Poussin in 1896:
$$ \pi(x) \sim \frac{x}{\ln x} $$
meaning the ratio in the table tends to 1. An even better estimate is the logarithmic integral
$$ \operatorname{Li}(x) = \int_2^x \frac{dt}{\ln t}. $$
For \( x = 10^6 \), \( \operatorname{Li}(x) \approx 78{,}627 \), astonishingly close to the true count 78,498. The question is: how close is it, always?
Riemann's 1859 Paper
In 1859 Bernhard Riemann, a German mathematician at Göttingen, published a short paper titled On the Number of Primes Less Than a Given Magnitude. It was his only paper on number theory, and it changed the subject forever.
Riemann studied the zeta function, first used by Euler:
$$ \zeta(s) = 1 + \frac{1}{2^s} + \frac{1}{3^s} + \frac{1}{4^s} + \cdots $$
Euler had discovered in 1737 that this sum is secretly a product over primes:
$$ \zeta(s) = \prod_{p \text{ prime}} \frac{1}{1 - p^{-s}} $$
This Euler product is the bridge between ordinary numbers and primes.
Worked Example 3: Approximating \( \zeta(2) \) with primes
Euler also proved \( \zeta(2) = \frac{\pi^2}{6} \approx 1.6449 \). Let us approach it using just the first few primes.
Step 1. For \( p = 2 \): \( \dfrac{1}{1 - 1/4} = \dfrac{4}{3} \).
Step 2. For \( p = 3 \): \( \dfrac{1}{1 - 1/9} = \dfrac{9}{8} \).
Step 3. For \( p = 5 \): \( \dfrac{1}{1 - 1/25} = \dfrac{25}{24} \).
Step 4. Multiply:
$$ \frac{4}{3} \times \frac{9}{8} \times \frac{25}{24} = \frac{900}{576} = 1.5625 $$
Step 5. Including \( p = 7 \) multiplies by \( \frac{49}{48} \), giving about 1.5951. Each extra prime nudges the product closer to 1.6449. A beautiful consequence: the probability that two randomly chosen integers share no common factor is \( 6/\pi^2 \approx 0.608 \).
The Hypothesis Itself
Riemann extended \( \zeta(s) \) to complex numbers \( s = \sigma + it \). The function equals zero at the "trivial" points \( -2, -4, -6, \ldots \), and also at infinitely many "non-trivial" zeros in the strip \( 0 < \sigma < 1 \). Riemann showed that the exact error in prime counting is controlled by these zeros, and he conjectured:
Riemann Hypothesis: every non-trivial zero of \( \zeta(s) \) has real part exactly \( \tfrac{1}{2} \).
The first such zero is at about \( \tfrac{1}{2} + 14.1347i \). If the hypothesis is true, then the primes are as evenly distributed as they possibly can be, and \( \pi(x) \) differs from \( \operatorname{Li}(x) \) by no more than roughly \( \sqrt{x}\,\ln x \).
Why It Matters
- Hundreds of theorems in number theory are proved "assuming the Riemann Hypothesis". A proof would confirm them all at once.
- It gives the sharpest possible control over gaps between primes.
- It is one of the seven Millennium Prize Problems set by the Clay Mathematics Institute in 2000, with a reward of USD 1 million.
- David Hilbert placed it on his famous list of 23 problems in 1900.
Did You Know?
- More than \( 10^{13} \) non-trivial zeros have been computed, and every single one has real part \( \tfrac{1}{2} \).
- Physicists have noticed that the spacings between zeta zeros match the spacings between energy levels of heavy atomic nuclei, a connection still not fully explained.
- The largest known primes are Mersenne primes of the form \( 2^p - 1 \), with tens of millions of digits, found by volunteer computers.
Key Takeaways
- Primes are the building blocks of all integers, and Euclid proved around 300 BC that there are infinitely many.
- The Prime Number Theorem (1896) says \( \pi(x) \) is approximately \( x / \ln x \), and \( \operatorname{Li}(x) \) is even more accurate.
- The Euler product links the zeta function directly to the primes.
- The Riemann Hypothesis states that all non-trivial zeros of \( \zeta(s) \) lie on the line with real part \( \tfrac{1}{2} \); it remains unproved after more than 160 years.
- Proving it would sharpen our knowledge of how primes are distributed and settle many other results.
Working on number theory, proofs or complex analysis assignments? Amathify's subject experts and PhD scholars provide clear step-by-step solutions, contact us via WhatsApp or the Ask a Question form.
Stuck on a problem or assignment?
Our experts and PhD scholars solve maths, physics and chemistry — step by step.