A mathematician once doodled during a boring meeting and stumbled onto a hidden pattern inside prime numbers that nobody had noticed before.
Prime numbers, those numbers divisible only by one and themselves, seem like they should follow some tidy rule. They stubbornly refuse to, and that refusal has produced some of the strangest stories in the history of mathematics.
A pattern with no formula, and no end
According to the fundamental theorem of arithmetic, every whole number greater than one breaks down into a unique combination of prime factors. Euclid proved around 300 BCE that there are infinitely many primes, one of the earliest results in what would become number theory.
Despite that, no simple, efficient formula exists for separating primes from composite numbers on sight. The prime number theorem shows that the larger a randomly chosen number is, the less likely it is to be prime, roughly in proportion to its number of digits. The number two holds a special distinction as the only even prime number in existence, since every other prime, without exception, is odd.
The formula that worked for 40 numbers, then suddenly failed
Leonhard Euler noticed something remarkable about the expression n squared minus n plus 41: plug in any whole number from 1 to 40, and the result is always prime. Try 41 itself, though, and the pattern collapses instantly, producing a perfect square instead. It stands as a perfect illustration of just how easily primes resist any simple generating formula.
Euler also solved the long standing Basel problem, discovering that the infinite sum of one plus one quarter plus one ninth plus one sixteenth, continuing forever, equals exactly pi squared divided by six, an unexpected and elegant bridge between prime numbers and the number pi.
A doodle that became a mathematical spiral
The mathematician Stanislaw Ulam made his own discovery almost by accident, during what he later described as a tedious meeting. Idly arranging whole numbers in a spiral on paper, he noticed the prime numbers clustering visibly along certain diagonal lines, a pattern now known as the Ulam spiral.
In 1742, Christian Goldbach wrote to Euler proposing that every even number greater than two can be written as the sum of two primes, a claim now verified for numbers beyond four times ten to the eighteenth power, yet still without a formal proof to this day.
From ancient Greece to the security of your bank account
Around 1550 BCE, the Rhind Mathematical Papyrus already showed early signs of distinguishing prime numbers from composite ones through work with Egyptian fractions. Roughly two centuries later, Eratosthenes developed his famous sieve, a simple method for generating complete lists of primes that mathematicians still use today.
It is easy to assume primes are a purely theoretical curiosity, but they sit at the very center of modern cryptography. The RSA encryption system, developed in the 1970s, relies entirely on the difficulty of factoring large prime numbers, quietly securing online banking and digital communication for the entire planet, all built on a mathematical fact first proven in ancient Greece.
From a bored mathematician’s spiral doodle to the security protecting every online transaction today, prime numbers keep proving that the simplest looking rule in mathematics can still hide some of its deepest mysteries.

