Prime numbers
A prime number has exactly two positive divisors: 1 and itself. Primality is computed, never editorialised.
What makes a number prime?
A whole number greater than 1 is prime when its only positive divisors — numbers that divide into it with nothing left over — are 1 and itself. A number with any other divisor as well is composite instead.
7 can only be arranged as a single row of 7 dots — there's no other whole-number rectangle it fits. 12 can be arranged three different ways — 1 × 12, 2 × 6, and 3 × 4 — which is exactly why it's composite, not prime.
7's divisors
1, 7
12's divisors
1, 2, 3, 4, 6, 12
Why isn't 1 a prime number?
1 has exactly one positive divisor — itself — not two, so it fails the definition outright. But there's a deeper reason mathematicians deliberately exclude it: every whole number greater than 1 has exactly one way to be written as a product of primes (ignoring order) — a fact called the fundamental theorem of arithmetic. If 1 counted as prime, that uniqueness would break, since you could always multiply in extra 1s: 12 = 2 × 2 × 3, but also 2 × 2 × 3 × 1, and 2 × 2 × 3 × 1 × 1, and so on forever. Excluding 1 keeps prime factorisation unique.
Why is 2 the only even prime number?
Every even number is divisible by 2 by definition. For an even number bigger than 2, that means it already has three divisors at minimum — 1, 2, and itself — which disqualifies it as prime. 2 is the sole exception because dividing it by 2 gives itself back, so it still only has two distinct divisors: 1 and 2.
Prime factorisation: breaking any number down
Every whole number greater than 1 can be built from primes multiplied together — its prime factorisation. For 84, that's:
84 = 2^2 × 3 × 7
This isn't just a classroom exercise: prime factorisation underlies how fractions are simplified to lowest terms, how least-common-multiples are found, and — at a much larger scale — the cryptography section below.
Worked example: is 97 prime?
You don't need to test every number up to 97 to check. The square root of 97 is just under 9.9, so it's enough to test whether any whole number from 2 through 9 divides evenly into it: 2, 3, 4, 5, 6, 7, 8, and 9 all fail to divide 97 evenly, so 97 is prime.
Why this matters
If 97 had a factor larger than 9.9, it would need a matching factor smaller than 9.9 to multiply back up to 97 — and that smaller partner would already have been caught by the test. This square-root shortcut is why primality testing stays practical even for fairly large numbers by hand, and is the starting point (though not the whole story) for the much faster algorithms computers use.
Primes and cryptography
Modern public-key cryptography (including RSA, used across the web) leans on a genuine asymmetry: multiplying two large prime numbers together is fast, but taking the resulting number and working backwards to find which two primes made it is, with today's computers and known methods, extremely slow once the primes are large enough. That asymmetry — not primes being "secret" on their own — is what makes them useful for encryption. It's also why sufficiently powerful future computers (including large-scale quantum computers, which remain a research target rather than a deployed threat) are an active area of cryptographic research.
Special families of primes
Beyond the basic prime/composite split, mathematicians name several notable prime patterns. Within this catalogue:
Twin primes
15 in catalogue
Sophie Germain primes
11 in catalogue
Safe primes
7 in catalogue
- Twin primes are pairs that differ by exactly 2, such as 11 and 13.
- Sophie Germain primesare primes p where 2p + 1 is also prime — named after the mathematician who used them to study Fermat's Last Theorem.
- Safe primes are the 2p + 1 result itself, and matter in some cryptographic constructions for the same reason ordinary primes do above.
Every individual number's profile page lists which of these categories it belongs to, in plain language rather than raw classification names.
Every prime number in the catalogue
Common questions
What is a prime number?
A prime number is a whole number greater than 1 with exactly two positive divisors: 1 and itself. Every other whole number greater than 1 is composite.
Why is 1 not a prime number?
By modern mathematical convention, 1 is excluded from the primes because it has only one positive divisor (itself), not two. Including it would also break unique prime factorisation — see the section below.
Why is 2 the only even prime number?
Every even number greater than 2 is divisible by 2 in addition to 1 and itself, giving it more than two divisors — so 2 is the only even number that stays prime.
What's the difference between a prime and a composite number?
A prime number has exactly two positive divisors; a composite number has more than two. Together with 1 (neither prime nor composite), these three categories cover every positive whole number.
Do I need to check every number up to n to know if n is prime?
No — you only need to test divisors up to the square root of n. If n has a factor larger than its square root, it must also have a matching factor smaller than its square root, so any factor pair would already have shown up.
Are primes actually used in real cryptography?
Yes, though the way is often oversimplified: RSA and similar public-key systems rely on the fact that multiplying two large primes together is fast, but factoring the resulting large number back into those primes is, for now, computationally very hard — not that primes are 'secret codes' themselves.