Grade 6
Prime numbers
The indivisible building blocks of every whole number — and the starting point for one of mathematics' longest-running mysteries.
IntuitionBuilding blocks for numbers
Every whole number bigger than 1 is either a prime or is built by multiplying smaller primes together — the way every molecule is built from atoms. Learn the atoms, and you understand how every molecule is put together.
Definition: Prime and composite numbers
A prime number is a whole number greater than 1 whose only positive divisors are 1 and itself. A whole number greater than 1 that is not prime is called composite — it has at least one divisor other than 1 and itself. The number 1 is neither prime nor composite: it has only one positive divisor.
The first primes are Notice that is the only even prime — every other even number is divisible by 2, so it has a third divisor besides 1 and itself.
SchoolQuick divisibility tests
| Divisor | Rule | Example |
|---|---|---|
| 2 | Last digit is even (0, 2, 4, 6, 8) | ends in |
| 3 | Digit sum is divisible by 3 | : |
| 5 | Last digit is 0 or 5 | ends in |
| 9 | Digit sum is divisible by 9 | : |
SchoolThe sieve of Eratosthenes
To find every prime up to some number , write down . Cross out every multiple of except itself, then every multiple of except itself, and so on. Whenever you reach a number that hasn't been crossed out, it's prime — cross out its multiples too. What survives the sieve is exactly the list of primes up to .
Example: Sieving up to 30
List all primes from 2 to 30 using the sieve.
Solution
Step 1 (Sieving multiples of 2, 3, and 5): Write down all integers from 2 to 30. First cross out multiples of 2 greater than 2 (4, 6, 8, …, 30), then multiples of 3 not yet crossed out (9, 15, 21, 27), and finally multiples of 5 not yet crossed out (25).
Step 2 (Stopping criterion and remaining primes): Primes above do not need their multiples crossed out, because any composite number must have at least one prime factor . The surviving numbers are the 10 primes up to 30: .
SchoolPrime factorization
Every composite number can be broken down into a product of primes. Keep dividing by the smallest prime that fits until only primes remain.
Every whole number greater than 1 can be written as a product of primes in exactly one way, apart from the order of the factors — for example and there is no other way to do it.
Why is it true?
This is why primes are called the 'atoms' of arithmetic: there's exactly one recipe for building each number, so knowing the primes and their powers tells you everything about a number's divisors.
Proof
Existence (by minimal counterexample): Suppose there exists an integer that cannot be written as a product of primes, and let be the smallest such integer. Since every prime is a product of a single prime, must be composite, so for integers satisfying . By the minimality of , both and are products of primes, whence their product is also a product of primes—a contradiction.
Euclid's Lemma: Suppose a prime satisfies with . Because is prime and , we have . By Bézout's identity, there exist integers such that . Multiplying both sides by yields ; since divides both and , must divide the right-hand side, giving .
Uniqueness: Assume for contradiction that some integer admits two distinct prime factorizations, and let (ordered so that and ) be the smallest such integer. Since , repeated application of Euclid's lemma shows that divides some prime , which forces . By symmetry , so . Canceling from both sides produces a smaller integer with two distinct prime factorizations, contradicting the minimality of .
SchoolAre there infinitely many primes?
There is no largest prime number — the list of primes never ends.
Why is it true?
Euclid's argument (c. 300 BCE): suppose there were only finitely many primes . Multiply them all together and add 1: . Dividing by any leaves remainder 1, so none of the divides . But must have some prime factor (by the fundamental theorem of arithmetic) — a prime that isn't on the list. So the list was never complete.
Proof
Step 1 (Constructing Euclid's number): Let be any finite collection of prime numbers. Form the integer by multiplying all primes in the list and adding . Since , we have .
Step 2 (Existence of a prime factor): By the fundamental theorem of arithmetic, every integer admits at least one prime divisor , so (where if itself is prime, or if is composite).
**Step 3 (Proving is a new prime):** Suppose for contradiction that for some index . Then , and since , the prime must divide their linear combination . This is impossible because every prime satisfies . Hence , proving that no finite list can contain all prime numbers.
Primes thin out as numbers grow — but Euclid's argument guarantees they never run out. Exactly how rare they become, and how evenly they're spread, is the subject of the prime number theorem and, beyond it, one of the deepest open questions in mathematics today.
UndergraduateReal-World Applications: Public-Key Cryptography (RSA)
Modern internet security (HTTPS, digital signatures, banking) relies on a striking asymmetry in number theory: multiplying two large primes and to form takes milliseconds, whereas factoring back into and when each prime has digits is computationally infeasible. In RSA cryptography (Rivest–Shamir–Adleman, 1977), the modulus and encryption exponent are published, while the decryption key satisfying requires knowing the secret prime factors to compute Euler's totient . Anyone can encrypt a message as , but only the holder of can recover .
Example: Mini-RSA key generation and encryption with primes p = 5, q = 11
Using the primes and with public exponent , compute the RSA modulus , Euler's totient , the private decryption key , and the ciphertext for the message .
Solution
Step 1 (Modulus and totient): Multiply the two secret primes to obtain the public modulus , and compute Euler's totient .
Step 2 (Private key and encryption): Solve for ; testing multiples of plus gives since . Encrypting with the public key yields the ciphertext .
Which of these numbers is prime?
Why is 2 the only even prime number?
What is the prime factorization of 84?
In Euclid's proof, suppose were all the primes. Let . What do we know about ?
References
- David M. Burton (2010). Elementary Number Theory
- John H. Conway, Richard K. Guy (1996). The Book of Numbers · DOI:10.1007/978-1-4612-4072-3