Prime Numbers

The indivisible building blocks of arithmetic - simple to define, yet containing some of mathematics' deepest mysteries.

01. What Is a Prime Number?

A prime number is a whole number greater than 1 that has exactly two positive divisors: 1 and itself.

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, ...

Every whole number greater than 1 can be expressed as a product of prime numbers. This is known as the Fundamental Theorem of Arithmetic.

Number
84
Prime Status
Composite
Number of Divisors
12
Prime factorisation

The number 84 can be broken down into its prime building blocks:

84 = 2 × 2 × 3 × 7

Once the prime factors are known, the original number can be reconstructed simply by multiplying them together.

02. The Sieve of Eratosthenes

The Sieve of Eratosthenes is one of the oldest and most elegant algorithms for finding prime numbers. Starting with a list of numbers, we repeatedly eliminate multiples of each prime.

Current Prime
Ready
Primes Found
25
Numbers Remaining
100
Why does the sieve work?

If a number is composite, it must have a factor less than or equal to its square root. Therefore, when searching up to 100, we only need to test primes up to:

√100 = 10

After eliminating multiples of 2, 3, 5 and 7, every number that remains is prime.

03. Prime Gaps

Prime numbers become less frequent as numbers get larger. The difference between consecutive prime numbers is called a prime gap.

Largest Gap
0
Average Gap
0
Prime Count
0
Prime gaps are irregular.

There is no simple repeating pattern governing the spacing between primes. Sometimes primes occur close together, while other times surprisingly large gaps appear.

Understanding how these gaps behave is one of the many areas where elementary-looking questions lead to deep mathematical research.

04. The Ulam Spiral

In 1963, mathematician Stanislaw Ulam noticed that primes appeared to form striking diagonal patterns when arranged in a spiral.

Numbers
0
Primes
0
Prime Density
0%
A remarkable visual pattern

The Ulam spiral does not prove a theorem by itself, but it provides a fascinating visual representation of the structure hidden inside the prime numbers.

Some diagonal lines contain unusually high concentrations of primes. Quadratic expressions such as:

n2 + n + 41

are closely connected with these patterns.

05. How Many Primes Are There?

There are infinitely many prime numbers. But an even more interesting question is how quickly they become less frequent.

π(n) ≈ n / ln(n)

This is the Prime Number Theorem. It tells us that the number of primes below n is approximately n divided by the natural logarithm of n.

Actual π(n)
0
n / ln(n)
0
Approximation Error
0%
The remarkable part

The Prime Number Theorem does not tell us exactly where the next prime will appear. Instead, it describes the large-scale density of primes.

As n becomes larger, the approximation becomes increasingly accurate. This is one of the great examples of how a simple mathematical expression can describe an apparently chaotic sequence.

06. Why Prime Numbers Matter

Arithmetic
Building Blocks
Cryptography
Security
Number Theory
Deep Structure
Open Problems
Many Remain

Prime numbers sit at the heart of modern cryptography. Large prime numbers are used to construct some of the mathematical problems that protect digital communications.

Yet their importance goes far beyond computing. Prime numbers connect arithmetic, algebra, geometry, analysis and probability.

Simple definition. Infinite sequence. Deep mystery.

Perhaps that is what makes primes so beautiful: they are among the simplest objects in mathematics, yet centuries after their discovery, some of their most fundamental properties remain unknown.

07. From Primes to the Zeta Function

Prime numbers may look irregular, but they are not without structure. One of the most remarkable discoveries in number theory is that the distribution of primes is deeply connected to a function from complex analysis: the Riemann zeta function.

ζ(s) = ∑n=1 1 / ns

For suitable values of the complex number s, the zeta function can be written as an infinite sum. But Euler discovered something even more extraordinary: the same function can also be expressed directly in terms of the prime numbers.

ζ(s) = ∏p prime 1 / (1 - p-s)

This is the Euler product. It tells us that the zeta function contains information about every prime number.

Prime Numbers 2, 3, 5, 7, 11, ...
ζ(s) The Riemann zeta function
Zeros A hidden pattern
A surprising connection

The Euler product means that the zeta function is not merely an abstract function. Its behaviour is intimately connected with the distribution of prime numbers.

The locations of the zeros of ζ(s) therefore tell us something profound about how primes are distributed.

08. The Critical Line & the Zeros

The Riemann zeta function is defined for complex numbers:

s = σ + it

Here σ is the real part and t is the imaginary part.

The most important region is known as the critical strip:

0 < Re(s) < 1

Inside this strip are the non-trivial zeros of the zeta function. The Riemann Hypothesis concerns precisely where these zeros lie.

The critical line is Re(s) = 1/2

The Riemann Hypothesis proposes that every non-trivial zero of the zeta function lies exactly on this line.

Real part Re(ζ)
Imaginary part Im(ζ)
What are we looking at?

The chart shows how the real and imaginary components of ζ(1/2 + it) change as we move up the critical line.

A zero occurs when both the real and imaginary parts are simultaneously zero.

09. The Zeros of ζ(s)

Along the critical line we can examine the magnitude:

|ζ(1/2 + it)|

Whenever this quantity reaches zero, we have found a zero of the zeta function.

|ζ(1/2 + it)|

Known non-trivial zeros

The first few zeros occur at approximately these heights on the critical line:

Zero 1 t ≈ 14.1347
Zero 2 t ≈ 21.0220
Zero 3 t ≈ 25.0109
Zero 4 t ≈ 30.4249
Zero 5 t ≈ 32.9351
Zero 6 t ≈ 37.5862
Zero 7 t ≈ 40.9187
Zero 8 t ≈ 43.3271
Every zero shown here lies on the critical line.

Billions of zeros have been calculated, and all of the non-trivial zeros that have been examined lie on Re(s) = 1/2.

But numerical evidence, however extensive, is not a proof.

10. The Riemann Hypothesis

In 1859, Bernhard Riemann proposed one of the most famous conjectures in mathematics.

Every non-trivial zero of ζ(s) has Re(s) = 1/2

In other words, although the zeta function lives in the complex plane, Riemann proposed that all of its non-trivial zeros lie precisely on one vertical line.

If the hypothesis is true, it would tell us that the apparent irregularity of prime numbers has a remarkably precise underlying structure.

Primes → Zeta Function → Zeros → Hidden Structure

The Riemann Hypothesis remains unproven. It is one of the Millennium Prize Problems, with a prize of $1 million for a correct proof or disproof.

Why does it matter?

The locations of the zeros of the zeta function are closely related to how accurately we can describe the distribution of prime numbers.

A proof of the Riemann Hypothesis would therefore represent a profound result about the hidden structure of the integers.

2, 3, 5, 7, 11, 13, ...    ↔    ζ(s)    ↔    Re(s) = 1/2
```
← Back