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
123 in catalogue
Sophie Germain primes
64 in catalogue
Safe primes
38 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
2
3
5
7
11
13
17
19
23
29
31
37
41
43
47
53
59
61
67
71
73
79
83
89
97
101
103
107
109
113
127
131
137
139
151
163
173
179
193
211
223
227
229
233
239
241
251
257
263
269
281
307
311
313
317
331
337
353
359
367
373
379
383
389
401
409
419
421
431
433
443
461
491
503
509
521
523
541
563
587
593
599
601
613
617
631
641
643
673
677
683
691
727
757
787
811
821
829
853
863
881
883
887
911
919
967
971
977
1009
1013
1019
1021
1031
1033
1039
1049
1051
1061
1063
1069
1087
1091
1093
1097
1103
1109
1117
1123
1129
1151
1153
1163
1171
1181
1187
1193
1201
1213
1217
1223
1229
1231
1237
1249
1259
1277
1279
1283
1289
1291
1297
1301
1303
1307
1319
1321
1327
1361
1367
1373
1381
1399
1409
1423
1427
1429
1433
1439
1447
1451
1453
1459
1471
1481
1483
1487
1489
1493
1499
1511
1523
1531
1543
1549
1553
1559
1567
1571
1579
1583
1597
1601
1607
1,609
1613
1619
1621
1627
1637
1657
1663
1667
1669
1693
1697
1699
1709
1721
1723
1733
1741
1747
1753
1759
1777
1783
1787
1789
1801
1811
1823
1831
1847
1861
1867
1871
1873
1877
1879
1889
1901
1907
1913
1931
1933
1949
1951
1973
1979
1987
1993
1997
1999
2003
2011
2017
2063
2083
2131
2207
2237
2467
2683
2707
2903
3389
3511
4093
4217
4271
4703
4861
5023
5077
5261
5737
5869
5981
6151
6229
6379
6397
6581
6709
6761
6823
7001
7027
7129
7331
7517
7541
7643
8009
8017
8081
8167
8191
8443
8747
9001
9241
9829
10,007
10,993
11,801
17,021
21,001
27,017
27,701
29,147
31,337
60,103
60,601
61,511
62,477
65,521
65,537
69,911
104,729
131,071
314,159
524,287
1,114,111
8,675,309
998,244,353
1,000,000,007
2,147,483,647
4,294,967,291
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.