🔢 Numbers
🔍Prime Numbers
Numbers divisible only by 1 and themselves — the atoms every other whole number is built from.
Try arranging 12 candies into a rectangle: 3×4 works, so does 2×6. Now 7 candies? Only a lonely single row — nothing divides 7 evenly.
Numbers like that are called primes. They are the atoms of the whole-number world: every other number is built by multiplying primes together.
Exactly two factors
A factor of a number is a number that divides it evenly. The number 12 has six factors: 1, 2, 3, 4, 6 and 12. But 7 has only 1 and 7 — exactly two, and that is the definition:
- Primes (exactly 2 factors): 2, 3, 5, 7, 11, 13, 17, 19…
- Composites (3 or more factors): 4, 6, 8, 9, 10, 12…
Factors always come in pairs: . Stop pairing once you reach the middle — which is exactly why prime-checking can quit early, as you will see below.
Type in a number and see whether it survives the test:
Prime factorization:60 = 22 × 3 × 5
Primes up to 60
235711131719232931374143475359…
Why 1 does not count
The number 1 has only one factor: itself. A prime needs exactly two, so 1 is neither prime nor composite. This is not pedantry — it is what makes prime factorizations unique. If 1 counted, then 12 could be written as 2×2×3, or 1×2×2×3, or 1×1×2×2×3… forever.
A bonus fact: 2 is the only even prime. Every other even number has at least three factors — 1, 2 and itself.
Quick check
To test whether n is prime, try dividing by the primes 2, 3, 5, 7… up to . If none divides it, it is prime. Take 97: is under 10, so trying 2, 3, 5 and 7 is enough — none divides 97, so it is prime.
Breaking numbers all the way down
Writing a number as a product of primes is called prime factorization. Keep splitting until only primes remain:
Start with 6×10 or with 2×30 — it makes no difference. You land on either way: different routes, same destination. That is the payoff of excluding 1: the factorization is one of a kind. A composite is a finished LEGO build; primes are the basic bricks in the bin.
Primes never run out
More than two thousand years ago, Euclid proved there are infinitely many primes, with an argument as neat as a magic trick: multiply all the primes you know and add 1, say . That new number is not divisible by any prime on your list — so either it is prime itself, or it has a brand-new prime factor. Either way, primes keep going.
Today primes guard your money: online payment security relies on the fact that multiplying two large primes is easy, but splitting the product back into its two primes is brutally hard.
Primes also have a charming quirk: they show up with no rhythm at all. 11 and 13 sit side by side (such pairs are called twin primes), but from 23 the next prime is 5 numbers away at 29, and from 89 it takes a gap of 7 to reach 97. They look scattered at random — yet each one is strictly defined.
Check yourself
Quick quiz
1. Which of these is prime?
2. Why is 1 not prime?
3. What is the prime factorization of 60?