The fundamental building blocks of all mathematics
A number greater than 1 that has exactly two factors: 1 and itself. It cannot be divided evenly by any other whole number.
A number greater than 1 that has more than two factors. It can be broken down into a product of prime numbers.
The number 1 is neither prime nor composite. It has only one factor (itself). By mathematical convention, 1 is excluded from both categories — and for good reason: including it would break the Fundamental Theorem of Arithmetic.
Every integer greater than 1 is either prime itself, or can be written as a unique product of primes — regardless of the order. Think of primes as the atoms of mathematics: all other numbers are molecules built from them.
RSA encryption — used in every HTTPS website and secure transaction — relies on the fact that multiplying two large primes is easy, but factoring the result is computationally infeasible.
Primes are the foundation of advanced mathematics including modular arithmetic, Diophantine equations, and analytic number theory.
Fast Fourier Transforms and hash functions used in data compression and networking exploit properties of prime numbers.
Cicadas emerge every 13 or 17 years (both prime) to avoid predators with 2–6 year cycles. Primes appear throughout biology.
Euclid proved there are infinitely many primes — one of the oldest mathematical proofs still in use today.
A simple algorithm to find all primes up to a given limit. Still taught and used in computer science today.
Bernhard Riemann conjectured a deep connection between primes and complex analysis. It remains one of math's greatest unsolved problems.
Rivest, Shamir & Adleman developed RSA — the first practical public-key cryptosystem — built entirely on prime number theory.
The largest known prime has over 41 million digits — a Mersenne prime (2ⁿ − 1) — discovered by the GIMPS distributed computing project.
The Sieve is a 2,200-year-old algorithm. Start with all numbers 2–100. Cross out multiples of each prime — what remains are all primes! Step through it one prime at a time.
Enter any number and watch the divisibility tests run in real time. See exactly why a number is prime or composite.
Enter a composite number and see its factor tree built automatically. Every branch ends at a prime — those are the atoms that make up your number.
Enter a number and click Build Tree →
RSA encryption — the backbone of internet security — works because multiplying two primes is trivial, but factoring the result is extremely hard. Select two primes below to see the concept in action.
Can you factor these numbers into their two prime components? This is exactly what makes RSA hard at scale.