Prime Numbers: The Unsolved Mysteries Keeping Mathematicians Up at Night
Introduction
Pick any whole number greater than 1. If the only numbers that divide it evenly are 1 and itself, it is prime. That is the entire definition. Two, three, five, seven, eleven, thirteen. Simple enough for a primary school student to understand.
And yet prime numbers have defeated the greatest mathematical minds in history. Questions about primes that a child could ask remain unanswered after thousands of years of effort by brilliant mathematicians armed with increasingly powerful computers. The deeper mathematicians look into the primes, the stranger and more mysterious they become — a pattern that promises order and then dissolves into what looks disturbingly like chaos.
Prime numbers are not just a curiosity. They are the fundamental building blocks of all whole numbers — every integer greater than 1 is either prime or can be broken down uniquely into prime factors. They are the atoms of arithmetic. And in the modern world, they are also the foundation of the cryptographic systems that protect every bank transaction, private message, and secure website on earth.
This is the story of the primes: ancient, mysterious, indispensable, and stubbornly resistant to being fully understood.
What Is a Prime Number?
A prime number is a whole number greater than 1 that has exactly two factors: 1 and itself. It cannot be divided evenly by any other whole number.
The first twenty prime numbers are:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71
A composite number is a whole number greater than 1 that is not prime — it has factors other than 1 and itself. Every composite number can be broken down into prime factors. For example:
- 12 = 2 × 2 × 3
- 100 = 2 × 2 × 5 × 5
- 360 = 2 × 2 × 2 × 3 × 3 × 5
- 1,001 = 7 × 11 × 13
The number 1 is neither prime nor composite — it is a special case in a class of its own. This is a deliberate mathematical convention, not an oversight, and it matters because including 1 as a prime would break the Fundamental Theorem of Arithmetic.
The Fundamental Theorem of Arithmetic
The most important basic fact about prime numbers is the Fundamental Theorem of Arithmetic: every integer greater than 1 can be expressed as a product of prime numbers in exactly one way, regardless of the order in which the primes are written.
This means that the prime factorisation of any number is unique — there is only one way to break it into prime factors. Just as every molecule is made of atoms in a specific arrangement, every number is made of primes in a specific arrangement. Primes are the atoms of arithmetic.
This uniqueness is why 1 cannot be prime. If 1 were prime, then:
- 12 = 2 × 2 × 3
- 12 = 1 × 2 × 2 × 3
- 12 = 1 × 1 × 2 × 2 × 3
...and so on, giving infinitely many factorisations for every number and destroying the uniqueness that makes the theorem powerful.
A Brief History of Prime Numbers
Ancient Greece: The Foundation
The systematic study of prime numbers began with the ancient Greeks. Around 300 BCE, Euclid — whose foundational role in mathematics we have encountered before — proved two of the most important results about primes in his landmark work Elements.
The first was a proof that prime numbers go on forever — there are infinitely many of them. The second was an early version of the Fundamental Theorem of Arithmetic. Euclid's proof of the infinitude of primes is one of the most elegant in all of mathematics and remains essentially unchanged after 2,300 years.
Euclid's Proof That Primes Are Infinite
Suppose, for the sake of argument, that there are only finitely many primes. List them all: p₁, p₂, p₃, ..., pₙ. Now consider the number N formed by multiplying all of them together and adding 1:
N = (p₁ × p₂ × p₃ × ... × pₙ) + 1
N is either prime or composite. If it is prime, we have found a prime not on our list — contradiction. If it is composite, it must have a prime factor. But N divided by any prime on our list leaves a remainder of 1 — so none of the primes on our list divide N. Therefore N must have a prime factor not on our list — again a contradiction.
Either way, our assumption that there are finitely many primes leads to a contradiction. Therefore there must be infinitely many primes. The proof is complete.
This proof is a perfect example of mathematical reasoning by contradiction — assuming the opposite of what you want to prove and showing that the assumption leads to an impossibility.
The Sieve of Eratosthenes
Around 240 BCE, the Greek mathematician Eratosthenes devised a brilliantly simple algorithm for finding all prime numbers up to a given limit, now known as the Sieve of Eratosthenes:
- Write down all whole numbers from 2 to your chosen limit.
- Circle 2 (it is prime) and cross out all multiples of 2.
- Move to the next uncrossed number — 3. Circle it and cross out all multiples of 3.
- Move to the next uncrossed number — 5. Circle it and cross out all multiples of 5.
- Continue until you reach the square root of your limit. All remaining uncrossed numbers are prime.
The Sieve of Eratosthenes is still one of the most efficient ways to find all primes below a given number, and variants of it are used in modern computational mathematics. A 2,200-year-old algorithm, still in use today.
Patterns and Properties of Prime Numbers
The Only Even Prime
Among the infinitely many prime numbers, exactly one is even: 2. Every other even number is divisible by 2 and is therefore composite. This makes 2 unique — mathematicians sometimes call it "the oddest prime" precisely because it is even.
Primes Become Rarer as Numbers Get Larger
Among the first 10 numbers, four are prime (2, 3, 5, 7) — that is 40%. Among the first 100 numbers, 25 are prime — 25%. Among the first 1,000 numbers, 168 are prime — about 16.8%. As numbers get larger, primes become progressively rarer.
The Prime Number Theorem, proved independently in 1896 by Jacques Hadamard and Charles Jean de la Vallée Poussin, quantifies this: the number of primes up to n is approximately n / ln(n), where ln is the natural logarithm. This theorem tells us roughly how many primes to expect in any range — but it cannot tell us exactly where they are.
Twin Primes
Twin primes are pairs of prime numbers that differ by exactly 2: (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), and so on. They seem to appear regularly — but do they continue forever, or does the sequence of twin primes eventually stop?
Nobody knows. The Twin Prime Conjecture — that there are infinitely many twin prime pairs — is one of the oldest and most famous unsolved problems in mathematics. In 2013, mathematician Yitang Zhang made a breakthrough by proving that there are infinitely many pairs of primes that differ by at most 70,000,000 — a huge number, but a finite one, which was the crucial point. Subsequent work by James Maynard and others reduced this bound dramatically, but the gap of exactly 2 remains unproven.
Mersenne Primes
A Mersenne prime is a prime number of the form 2ⁿ − 1, where n itself is a prime. Named after the French monk Marin Mersenne who studied them in the seventeenth century, these primes have a special structure that makes them particularly easy to test with computers.
The first few Mersenne primes are:
- 2¹ − 1 = 1 (not prime — n must itself be prime)
- 2² − 1 = 3 (prime)
- 2³ − 1 = 7 (prime)
- 2⁵ − 1 = 31 (prime)
- 2⁷ − 1 = 127 (prime)
- 2¹¹ − 1 = 2,047 = 23 × 89 (not prime — not every 2ⁿ − 1 is prime)
As of 2024, only 51 Mersenne primes are known. The largest known prime number of any kind is almost always a Mersenne prime — the current record holder has over 24 million digits. Whether there are infinitely many Mersenne primes is another open question.
The Great Internet Mersenne Prime Search (GIMPS) is a distributed computing project that uses volunteer computers around the world to search for new Mersenne primes. Several of the largest known primes have been discovered by ordinary people running GIMPS software on their home computers.
Goldbach's Conjecture
In 1742, the Prussian mathematician Christian Goldbach wrote a letter to Leonhard Euler proposing what has become one of the most famous unsolved problems in all of mathematics:
Every even integer greater than 2 can be expressed as the sum of two prime numbers.
Examples:
- 4 = 2 + 2
- 6 = 3 + 3
- 8 = 3 + 5
- 10 = 3 + 7 = 5 + 5
- 100 = 3 + 97 = 11 + 89 = 17 + 83 = 29 + 71 = 41 + 59 = 47 + 53
- 1,000 = 3 + 997 = 17 + 983 = ...
Computers have verified Goldbach's Conjecture for every even number up to 4 × 10¹⁸ — that is 4,000,000,000,000,000,000. It has never once failed. And yet, after nearly three centuries of effort by some of the greatest mathematicians who ever lived, nobody has proved it must be true for all even numbers. It remains an open conjecture — almost certainly true, but unproven.
The Riemann Hypothesis: The Greatest Unsolved Problem in Mathematics
Of all the unsolved problems in mathematics, one stands above the rest in fame, importance, and difficulty. The Riemann Hypothesis, posed by the German mathematician Bernhard Riemann in 1859, is so significant that it is one of the seven Millennium Prize Problems — each carrying a one-million-dollar prize for a correct solution from the Clay Mathematics Institute.
What Is the Riemann Hypothesis?
To understand the Riemann Hypothesis, we need to know about the Riemann Zeta Function — a mathematical function defined for complex numbers. The zeta function has certain input values, called zeros, where it equals zero.
Some of these zeros are obvious — the negative even integers −2, −4, −6, and so on. These are called the trivial zeros. The interesting ones are the non-trivial zeros, which all appear to lie on a specific vertical line in the complex plane called the critical line, where the real part of the input equals 1/2.
The Riemann Hypothesis states:
All non-trivial zeros of the Riemann Zeta Function have real part equal to 1/2.
Why Does It Matter for Prime Numbers?
Riemann discovered a deep connection between the zeros of the zeta function and the distribution of prime numbers. The location of the zeros controls how accurately the Prime Number Theorem describes the distribution of primes — and therefore how predictably primes are spread among the integers.
If the Riemann Hypothesis is true, it would give us the most precise possible understanding of how primes are distributed — confirming that they are spread as regularly as they can possibly be, given their fundamental irregularity. It would also prove dozens of other results in number theory that currently depend on the hypothesis being assumed true.
Computers have verified that the first 10 trillion non-trivial zeros all lie on the critical line. Not a single exception has ever been found. And yet no proof exists. The Riemann Hypothesis has been unproven for over 165 years — and most mathematicians believe it is the hardest problem in mathematics.
Prime Numbers and Cryptography
Prime numbers are not just theoretically interesting. They are the foundation of the cryptographic systems that secure the modern digital world.
The RSA Algorithm
In 1977, mathematicians Ron Rivest, Adi Shamir, and Leonard Adleman developed the RSA encryption algorithm — named from their initials — which became the most widely used public-key cryptography system in history. It secures the padlock symbol you see in your browser when visiting secure websites. It protects online banking, email encryption, digital signatures, and secure communications worldwide.
RSA is built entirely on a simple asymmetry in the mathematics of prime numbers:
- Multiplying two large prime numbers together is easy. A modern computer can multiply two 300-digit primes in a fraction of a second.
- Factoring the result back into its two prime factors is extraordinarily hard. Given a 600-digit number that is the product of two large primes, the fastest known algorithms running on the fastest computers would take longer than the age of the universe to find those factors.
This asymmetry — easy to do, hard to undo — is what makes RSA secure. Your browser and a secure website exchange a public key (a large number that is the product of two secret primes) and use it to encrypt communications. Only the holder of the secret prime factors can decrypt the messages. Since factoring the public key is computationally infeasible, the communications remain secure.
How Large Are the Primes Used?
Modern RSA implementations use prime numbers with hundreds of digits — numbers so large that if you wrote them out, they would fill several pages. The RSA-2048 standard uses a public key that is the product of two 1,024-bit primes — numbers with roughly 308 decimal digits each. Finding these prime factors would require computational resources so vast they are effectively impossible with current technology.
The Threat of Quantum Computing
In 1994, mathematician Peter Shor devised a quantum algorithm — Shor's Algorithm — that could factor large numbers exponentially faster than any classical algorithm, potentially breaking RSA encryption. A sufficiently powerful quantum computer running Shor's Algorithm could crack RSA-2048 in hours or days.
Such a computer does not yet exist — current quantum computers are far too small and error-prone. But the prospect has driven intense research into post-quantum cryptography: new encryption systems that would remain secure even against quantum computers. Protecting the world's digital security in a post-quantum era is one of the most urgent applied mathematics problems today.
Primality Testing: How Do We Know If a Number Is Prime?
For small numbers, testing for primality is easy — just check whether any smaller number divides it. But for the enormous primes used in cryptography, we need efficient algorithms.
Trial Division
The simplest method: divide the candidate number by every prime up to its square root. If none divide evenly, the number is prime. This works well for small numbers but becomes impractical for very large ones — the square root of a 300-digit number is still a 150-digit number, and there are astronomically many primes to try.
The Miller-Rabin Primality Test
Modern cryptography uses probabilistic primality tests — algorithms that do not guarantee a number is prime but can declare it composite with certainty, or declare it probably prime with a probability of error as small as desired. The Miller-Rabin test is the most widely used and can test a 1,000-digit number in milliseconds with an error probability so small it is effectively zero.
The AKS Primality Test
In 2002, three Indian computer scientists — Manindra Agrawal, Neeraj Kayal, and Nitin Saxena — published the first deterministic polynomial-time primality test: an algorithm that can definitively prove any number prime or composite in a time that grows polynomially with the number of digits. Known as the AKS test, it was a landmark theoretical result, though in practice probabilistic tests remain faster for the numbers used in cryptography.
Curiosities and Remarkable Prime Facts
Prime Gaps
The gap between consecutive primes varies unpredictably. After 2, all primes are odd, so the minimum gap is 2 (twin primes). But gaps can also be arbitrarily large — for any number n, you can find a sequence of n consecutive composite numbers: simply consider (n+1)! + 2, (n+1)! + 3, ..., (n+1)! + (n+1), each of which is divisible by 2, 3, ..., n+1 respectively. The largest known prime gaps are enormous.
Prime Constellations
Beyond twin primes, mathematicians study prime constellations — patterns of primes with specific differences. Cousin primes differ by 4: (3, 7), (7, 11), (13, 17). Sexy primes differ by 6: (5, 11), (7, 13), (11, 17). Prime triplets like (5, 7, 11) and prime quadruplets like (5, 7, 11, 13) have also been extensively studied. Whether infinitely many of each type exist remains largely unproven.
Ulam's Spiral
In 1963, mathematician Stanisław Ulam, bored during a meeting, began writing integers in a spiral on graph paper and circling the primes. He noticed something astonishing: the primes clustered along diagonal lines, forming visible diagonal streaks across the spiral. These diagonals correspond to quadratic polynomial expressions that generate unusually many primes. Nobody fully understands why.
The Prime Number Race
Among primes greater than 2, every prime leaves a remainder of either 1 or 3 when divided by 4. Are there more primes of one type than the other? Empirically, primes leaving remainder 3 seem to lead — a phenomenon called Chebyshev's Bias. But the lead changes infinitely often, and the race between the two types is one of the subtlest and most fascinating phenomena in prime number theory.
Prime Numbers and WAEC/JAMB Mathematics
Prime numbers are a direct and examinable topic in both WAEC and JAMB mathematics:
- Identification: Being able to identify prime numbers quickly, and distinguish them from composite numbers, is a basic examination requirement.
- Prime factorisation: Expressing composite numbers as products of prime factors — and writing these in index form — is examined at both levels.
- Highest Common Factor (HCF): Finding the HCF of two or more numbers by prime factorisation is a standard technique. The HCF is the product of the prime factors common to all numbers.
- Lowest Common Multiple (LCM): Finding the LCM by prime factorisation is equally standard. The LCM is the product of all prime factors, each taken to its highest power.
- The Sieve of Eratosthenes: Understanding and applying the sieve to list all primes below a given number is a useful technique for both examinations and general number theory.
- Indices: Mersenne primes and similar expressions connect to index notation and the laws of indices, which are directly examined.
Common Mistakes Students Make With Prime Numbers
- Including 1 as a prime number. The number 1 is neither prime nor composite. This is one of the most common errors in examinations.
- Forgetting that 2 is prime. Two is the only even prime. Students sometimes exclude it from lists of primes because it is even.
- Incomplete prime factorisations. Always continue factorising until every factor is prime. 12 = 4 × 3 is not a complete prime factorisation — 4 must be broken into 2 × 2.
- Confusing HCF and LCM. The HCF uses only shared prime factors; the LCM uses all prime factors. A clear method and careful reading of the question prevents this error.
- Assuming large odd numbers are prime. 51 = 3 × 17. 91 = 7 × 13. 119 = 7 × 17. Always test divisibility systematically rather than assuming a number is prime because it looks prime.
Conclusion
Prime numbers sit at the intersection of extreme simplicity and extreme depth. Their definition fits in one sentence. Their properties have occupied the greatest mathematical minds for over two thousand years and continue to do so today. Questions a child could formulate — are there infinitely many twin primes? Can every even number be written as the sum of two primes? — remain unanswered despite centuries of effort.
Yet primes are not merely abstract. They guard your bank account, secure your messages, protect your identity online. The encryption that makes the digital economy possible rests entirely on the mathematical difficulty of factoring large numbers — a difficulty rooted in the mysterious, irregular distribution of the primes themselves.
The primes are infinite in number, irreducible in structure, and inexhaustible as objects of mathematical study. Every time we think we understand them, they reveal another layer of mystery. They are, as the mathematician Don Zagier once said, among the most arbitrary and disorderly objects studied by mathematicians — and yet they exhibit stunning regularity in the large scale, following laws of breathtaking precision.
Simple enough for a child to understand. Deep enough to keep mathematicians awake for the rest of human history.