Prime and composite numbersInvestigateabout 50 min
Hunting patterns among the primes
Predict, test and decide: which prime patterns are real, and which ones fool you?
Test claims about primes like a mathematician: how fast primes thin out, the 6-column grid, last digits, twin prime hunts, why 3, 5, 7 stands alone, co-prime experiments, patterns that break, prime deserts and numbers with the most factors.
In this part you’ll
- Make predictions about primes and test them with data and labs.
- Explain why every prime above 3 is one more or one less than a multiple of 6, and why 3, 5, 7 is the only prime triplet.
- Decide whether claims about primes, co-primes and divisibility are always, sometimes or never true, using counterexamples.
- Build prime deserts of any length and describe how prime gaps and twin primes behave.
- Discover the rule linking a prime factorisation to the number of factors.
This layer is a laboratory. Instead of being told facts about primes, you will predict, test and decide whether patterns are real. Mathematicians have done exactly this for over two thousand years, and some of the questions below are still being investigated today.
Three rules for every investigation:
- Predict first. Write your guess before you test. A wrong prediction you can explain teaches more than a right guess you cannot.
- Collect evidence. Try many cases, including awkward ones: small numbers, big numbers, even and odd.
- One counterexample kills a claim. A pattern that works 40 times and fails once is not always true. But no number of examples can prove a pattern is always true; for that you need a reason, which is what the Deepen layer is for.
Chapter 01
Do primes run out?
Predict first
| Up to | Number of primes | Share that are prime | Average gap between primes |
|---|---|---|---|
| 10 | 4 | 40.0% | about 2.5 |
| 100 | 25 | 25.0% | about 4.0 |
| 1,000 | 168 | 16.8% | about 6.0 |
| 10,000 | 1,229 | 12.3% | about 8.1 |
| 100,000 | 9,592 | 9.6% | about 10.4 |
| 1,000,000 | 78,498 | 7.8% | about 12.7 |
Log scale: each step up is ten times bigger. The number of primes keeps growing, but each tenfold jump in range adds fewer than tenfold primes.
- Primes up to 104
- Primes up to 10025
- Primes up to 1,000168
- Primes up to 10,0001,229
- Primes up to 100,0009,592
- Primes up to 1,000,00078,498
| Block | Primes | Block | Primes |
|---|---|---|---|
| 1–100 | 25 | 501–600 | 14 |
| 101–200 | 21 | 601–700 | 16 |
| 201–300 | 16 | 701–800 | 14 |
| 301–400 | 16 | 801–900 | 15 |
| 401–500 | 17 | 901–1000 | 14 |
Try it
Chapter 02
The 6-column grid
In Discover and Understand you drew the numbers in rows of 10. Now rearrange them in rows of 6:
1, 2, 3, 4, 5, 6 7, 8, 9, 10, 11, 12 13, 14, 15, 16, 17, 18 …
Before you look, predict: where will the primes land?
Predict first
Lab
Sieve the numbers 1 to 100 on a 6-column grid and see which columns the primes fall into.
Start by crossing out 1. It has only one factor (itself), so it is not prime.
Legend: circled green with bold number = prime · faded with a slash = crossed out (not prime). We only need to sieve with primes up to √100 ≈ 10.0, because any composite number up to 100 has a factor no bigger than that.
Text version of this activity
The lab lays out 1 to 100 in rows of 6. After sieving:
- Column under 1 (1, 7, 13, 19, 25, …, 97): holds the primes 7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 97 and the composites 25, 49, 55, 85, 91.
- Column under 5 (5, 11, 17, 23, 29, …, 95): holds 5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89 and the composites 35, 65, 77, 95.
- Columns under 2, 4, 6 contain only even numbers; the only prime among them is 2.
- Column under 3 contains only multiples of 3; the only prime is 3.
So every prime bigger than 3 is one less or one more than a multiple of 6 (6k − 1 or 6k + 1). The primes look like two straight stripes. In hunt mode you can use this: skip four of the six columns.
Try it
Predict first
Chapter 03
What digit do primes end in?
Predict first
| Last digit | How many primes | Examples |
|---|---|---|
| 1 | 40 | 11, 31, 41, 61, 71, 101 |
| 3 | 42 | 3, 13, 23, 43, 53, 73 |
| 7 | 46 | 7, 17, 37, 47, 67, 97 |
| 9 | 38 | 19, 29, 59, 79, 89, 109 |
| 2 or 5 | 2 | Only 2 and 5 themselves |
| 0, 4, 6 or 8 | 0 | None: these are all even |
Chapter 04
Hunting twin primes
Twin primes are prime pairs that differ by 2, such as 41 and 43. Use the lab to hunt them up to 200, and keep a tally of how many you find in each hundred. Then compare with the data below, which a computer counted up to 1,000.
Lab
Find all the twin prime pairs up to 200 and notice where they sit on the grid.
Find pairs of primes that are just 2 apart, like 11 and 13.
Text version of this activity
In twins mode the lab shows 1 to 200 in rows of 10 and asks you to tap both members of each twin prime pair.
Up to 200 there are 15 pairs: (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61), (71, 73), (101, 103), (107, 109), (137, 139), (149, 151), (179, 181), (191, 193), (197, 199).
Patterns to notice:
- After (3, 5), every pair straddles a multiple of 6: 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150, 180, 192, 198.
- On a 10-column grid, twins after (5, 7) always end in 1 and 3, 7 and 9, or 9 and 1.
- There are long stretches with none, such as from 150 to 178.
| Hundred | Twin pairs | Hundred | Twin pairs |
|---|---|---|---|
| 0–99 | 8 | 500–599 | 3 |
| 100–199 | 7 | 600–699 | 3 |
| 200–299 | 4 | 700–799 | 0 |
| 300–399 | 2 | 800–899 | 5 |
| 400–499 | 3 | 900–999 | 0 |
Predict first
Chapter 05
Why 3, 5, 7 stands alone
3, 5 and 7 are three primes in a row, each 2 apart. Can you find another such prime triplet of the form n, n + 2, n + 4?
Try some: 5, 7, 9 (9 = 3 × 3). 11, 13, 15 (15 = 3 × 5). 17, 19, 21 (21 = 3 × 7). 29, 31, 33 (33 = 3 × 11). 41, 43, 45. Each time one of the three is a multiple of 3. Is that a coincidence?
| If n leaves remainder… | n + 2 leaves | n + 4 leaves | Which one is a multiple of 3? |
|---|---|---|---|
| 0 | 2 | 1 | n itself |
| 1 | 0 | 2 | n + 2 |
| 2 | 1 | 0 | n + 4 |
Chapter 06
Co-prime experiments
Two numbers are co-prime when their highest common factor is 1. Test these claims yourself before reading the verdicts in the table. For each one, try at least five examples, including small ones.
- Two consecutive numbers are always co-prime.
- Two consecutive odd numbers are always co-prime.
- Two consecutive even numbers are always co-prime.
- If a and b are co-prime, then a and a + b are co-prime.
- A prime and any other number are co-prime.
- Two composite numbers are never co-prime.
Lab
Choose a number and light up every number up to 100 that is co-prime with it, then spot the pattern.
Two numbers are co-prime when their only common factor is 1. They don’t have to be prime themselves!
Text version of this activity
In co-prime mode the lab picks a target number and asks you to tap every number on the 1 to 100 grid that is co-prime with it (shares no factor except 1).
- Target 10 = 2 × 5: the co-prime numbers are exactly those ending in 1, 3, 7 or 9. There are 40 of them up to 100.
- Target 12 = 2² × 3: the co-prime numbers are those that are neither even nor a multiple of 3, which fall in two columns on a 6-column grid. There are 33 up to 100.
- Target 7 (prime): every number except the multiples of 7 is co-prime with it: 100 − 14 = 86 numbers.
- Target 30 = 2 × 3 × 5: only 26 numbers up to 100 are co-prime with it, including 1, 7, 11, 13, 17, 19, 23, 29, 31 and 49.
The more different primes a target has, the fewer numbers are co-prime with it. The number's neighbours, one below and one above, are always co-prime with it.
| Claim | Verdict | Evidence or reason |
|---|---|---|
| 1. Consecutive numbers | Always | A common factor would divide their difference, which is 1. So the HCF is 1. |
| 2. Consecutive odd numbers | Always | A common factor would divide the difference 2, so it is 1 or 2. Both numbers are odd, so it is not 2. |
| 3. Consecutive even numbers | Never | Both are even, so they share 2. Example: 10 and 12. |
| 4. a, b co-prime ⇒ a and a + b co-prime | Always | A factor of a and a + b also divides (a + b) − a = b. So it is a common factor of a and b: only 1. |
| 5. A prime and any number | Sometimes | 7 and 30 are co-prime, but 7 and 35 are not. It fails when the number is a multiple of the prime. |
| 6. Two composites are never co-prime | False (sometimes co-prime) | 8 and 15, 4 and 9 and 25 and 36 are co-prime pairs of composites. |
Predict first
Try it
Chapter 07
Is it always true? Patterns that fool you
Primes are famous for luring people into false patterns. Here are four real ones. For each, test a few cases and decide whether you believe it before reading on.
Explore
Four patterns that look perfect
Choose a pattern to see how long it lasts and where it breaks.
- n = 0 → 41
- n = 1 → 43
- n = 2 → 47
- … all prime …
- n = 40 → 1,681
Breaks at n = 40
Leonhard Euler noticed in 1772 that n × n + n + 41 gives a prime for n = 0, 1, 2, … all the way to 39: forty primes in a row. At n = 40 it gives 1,681 = 41 × 41. It must fail there, because every term is 40 × 40 + 40 + 41 = 40 × 41 + 41 = 41 × 41. Forty successes, then one failure, and the claim "always prime" is dead.
Lab
Decide whether each claim about primes and factors is always, sometimes or never true, using examples and counterexamples.
Is each statement always, sometimes or never true? Test it with examples.
12 cards, 3 bins. Tap a card, then tap its bin. You can also drag, or press a bin’s number key.
Text version of this activity
This game has 12 statements and three bins.
Always true: the product of two primes is composite; a prime bigger than 2 is odd; two consecutive numbers are co-prime; a number divisible by 3 and 5 is divisible by 15; a number with exactly three factors is a square.
Sometimes true: the sum of two primes is even (fails with 2 + 3); a number ending in 7 is prime (27 is not); adding 1 to a prime gives a composite (2 + 1 = 3 is prime); divisible by 4 and 6 means divisible by 24 (12 is a counterexample).
Never true: the sum of three consecutive numbers is prime (it is always 3 times the middle number); a square is prime; two even numbers are co-prime.
To show "sometimes", give one example and one counterexample. To show "always" or "never", you need a reason that covers every case.
Predict first
Chapter 08
Prime deserts and prime gaps
The gap between two neighbouring primes is their difference. Up to 100, the gaps are small: mostly 2, 4 or 6. The biggest is between 89 and 97, a gap of 8, with seven composites (90 to 96) in a row.
Up to 1,000 the biggest gap is 20, between 887 and 907. Can gaps be as big as you like? Here is a clever way to build a "prime desert" of any length.
Multiply 2 × 3 × 4 × 5 × 6 = 720. Now look at 722, 723, 724, 725, 726:
- 722 = 720 + 2 is divisible by 2 (both parts are).
- 723 = 720 + 3 is divisible by 3.
- 724 = 720 + 4 is divisible by 4.
- 725 = 720 + 5 is divisible by 5.
- 726 = 720 + 6 is divisible by 6.
Five composites in a row, guaranteed, without testing any of them. Multiply up to 11 instead and you get ten composites in a row. There are prime deserts as long as you want.
| Gap | Between | Composites in a row |
|---|---|---|
| 1 | 2 and 3 | 0 |
| 2 | 3 and 5 | 1 |
| 4 | 7 and 11 | 3 |
| 6 | 23 and 29 | 5 |
| 8 | 89 and 97 | 7 |
| 14 | 113 and 127 | 13 |
| 18 | 523 and 541 | 17 |
| 20 | 887 and 907 | 19 |
Try it
Chapter 09
Which numbers have the most factors?
Primes have the fewest factors possible (two). At the other extreme, some numbers are crammed with factors. Investigate:
- Which numbers have exactly 3 factors? Try 4, 9, 25 and 49. Can you find any others under 100?
- Which numbers have an odd number of factors?
- Can you predict the number of factors from the prime factorisation?
Use the factor tree lab to factorise each number, then count its factors and look for a rule.
Lab
Factorise numbers with many factors, then compare the index form with the number of factors to find a rule.
Key: double green ring = prime leaf · dashed = still to do · thick amber ring = the branch you’re working on.
Choose two numbers that multiply to make 16.
Split 16 into a factor pair:
Wrong tries on this tree: 0
Text version of this activity
The lab builds a factor tree for each number and writes the result in index form. Record the number of factors next to each one.
- 16 = 2⁴: 5 factors
- 24 = 2³ × 3: 8 factors
- 36 = 2² × 3²: 9 factors
- 48 = 2⁴ × 3: 10 factors
- 72 = 2³ × 3²: 12 factors
- 100 = 2² × 5²: 9 factors
- 120 = 2³ × 3 × 5: 16 factors
- 144 = 2⁴ × 3²: 15 factors
- 180 = 2² × 3² × 5: 18 factors
- 360 = 2³ × 3² × 5: 24 factors
Look at 16 = 2⁴ with 5 factors, 36 = 2² × 3² with 9 = 3 × 3 factors, and 72 = 2³ × 3² with 12 = 4 × 3 factors. The pattern: add 1 to each power and multiply. 360 = 2³ × 3² × 5 gives 4 × 3 × 2 = 24 factors. The Deepen layer explains why.
| Number | Index form | Powers + 1 | Number of factors |
|---|---|---|---|
| 8 | 2³ | 4 | 4 |
| 12 | 2² × 3 | 3 × 2 | 6 |
| 16 | 2⁴ | 5 | 5 |
| 18 | 2 × 3² | 2 × 3 | 6 |
| 30 | 2 × 3 × 5 | 2 × 2 × 2 | 8 |
| 36 | 2² × 3² | 3 × 3 | 9 |
| 48 | 2⁴ × 3 | 5 × 2 | 10 |
| 60 | 2² × 3 × 5 | 3 × 2 × 2 | 12 |
| 72 | 2³ × 3² | 4 × 3 | 12 |
| 100 | 2² × 5² | 3 × 3 | 9 |
| 360 | 2³ × 3² × 5 | 4 × 3 × 2 | 24 |
Predict first
Chapter 10
Testing divisibility tricks
Divisibility rules are claims too, so test them like any other.
- Does the digit-sum trick work for 7? 16 has digit sum 7 but 16 is not divisible by 7; 21 is divisible by 7 but its digit sum is 3. So no: the digit-sum trick is special to 3 and 9.
- Does the "last two digits" trick work for 3? 115 ends in 15, which is divisible by 3, but 115 is not. So no: that trick is special to 4 (and 25).
- Reverse the digits. 82 − 28 = 54; 731 − 137 = 594; 5,020 − 205 = 4,815. Divide each by 9. Is a number minus its reverse always a multiple of 9? Test more cases, then look for the reason in Deepen.
Worked example
0 / 4 steps shownA number minus its reverse
Test the claim "a number minus its reverse is always divisible by 9" on 4,213.
Worked example
0 / 5 steps shownThe 1,001 trick
Pick any three-digit number, say 358, and write it twice: 358,358. Show that the result is always divisible by 7, 11 and 13.
Try it
Contrasts with
Number and shape patternsUnlike squares or multiples, primes resist every simple rule: the traps in this layer show patterns that hold for a while, then break.
Related to
Data handlingCounting primes per block, last digits and gaps is data handling: tallies, tables and spotting trends.
Chapter 11
Findings and a check
Words to know
All maths vocabulary →Investigation words
- conjecture
- A statement that seems true from the evidence but has not been proved.
- Example: Twin primes go on forever.
- counterexample
- One example that shows a claim is false.
- Example: 2 + 3 = 5 is a counterexample to "the sum of two primes is even".
- proof
- An argument that shows a statement is true in every possible case.
- prime gap
- The difference between a prime and the next prime.
- Example: The gap after 89 is 8.
- prime desert
- A long run of consecutive composite numbers.
- Example: 90 to 96
- 6k ± 1
- Numbers one less or one more than a multiple of 6. Every prime above 3 has this form.
- Example: 29 = 6 × 5 − 1
- highly composite number
- A number with more factors than any smaller number. Studied by Ramanujan.
- Example: 12, 24, 36, 48, 60
- repunit
- A number made only of the digit 1.
- Example: 1,111
- remainder class
- All the numbers that leave the same remainder when divided by a given number.
- Example: Remainder 1 on dividing by 3: 1, 4, 7, 10, …
- necessary condition
- Something that must be true, but is not enough on its own.
- Example: Ending in 1, 3, 7 or 9 is necessary for a prime above 5.
Quick check
What did the investigations show?
10 questions · answer what you can, then check. Getting one wrong is useful.
Reflect
This stays on this page only. It isn’t saved or sent anywhere.
Keep this
Findings so far
- Primes thin out: 25 up to 100, 168 up to 1,000, 78,498 up to a million. But they never run out.
- Every prime above 3 is 6k − 1 or 6k + 1. Not every such number is prime (25, 35, 49, …).
- Primes above 5 end in 1, 3, 7 or 9, roughly equally often.
- Twin primes get rarer faster than primes: 35 pairs up to 1,000. Whether they go on forever is unsolved.
- The number between twin primes (after 3, 5) is a multiple of 6.
- 3, 5, 7 is the only prime triplet: one of n, n + 2, n + 4 is always a multiple of 3.
- Consecutive numbers and consecutive odd numbers are always co-prime; consecutive even numbers never are.
- Patterns can hold many times and still fail: n × n + n + 41 fails at 40; 2¹¹ − 1 = 23 × 89.
- Prime gaps can be as long as you like: 720 + 2 to 720 + 6 are five composites in a row.
- Numbers with exactly three factors are squares of primes. Number of factors: add 1 to each power and multiply.
- Combine divisibility tests only with co-prime pieces: 12 = 3 × 4, 24 = 3 × 8.
Where this comes from
Sources
prime (opens another website) — Encyclopaedia Britannicaawaiting owner check
Supports the definition of a prime as a positive integer above 1 divisible only by itself and 1, the fundamental theorem of arithmetic (unique prime factorisation) and primes as multiplicative building blocks, and primes being studied in antiquity by Euclid and Eratosthenes.
sieve of Eratosthenes (opens another website) — Encyclopaedia Britannicaawaiting owner check
Supports the sieve procedure — list the natural numbers in order, strike out 1, then every second number after 2, every third after 3, and so on, leaving the primes — and Eratosthenes of Cyrene (c. 276–194 BCE) as its namesake.
Twin prime (opens another website) — Wikipediaawaiting owner check
Supports the list of twin primes, the twin prime conjecture being unsolved, Yitang Zhang's 2013 bound below 70 million, its reduction to 246 within a year using Maynard's and Polymath's methods, and the record twin primes with 388,342 digits.
List of known Mersenne prime numbers (opens another website) — Great Internet Mersenne Prime Search (GIMPS)awaiting owner check
Supports Mersenne primes of the form 2ⁿ − 1 and the current record: 2^136279841 − 1, 41,024,320 digits, found by Luke Durant on 12 October 2024, the 52nd known Mersenne prime (a provisional rank, as not every smaller candidate has been tested).
Divisibility Rules (opens another website) — Math is Funawaiting owner check
Supports the divisibility tests for 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 and 12, and the rule that a number divisible by another is divisible by each of that number's factors (6 from 2 and 3; 12 from 3 and 4).
Ganita Prakash, Class 6, Chapter 5: Prime Time (opens another website) — National Council of Educational Research and Training (NCERT)awaiting owner check
Supports the syllabus scope: common multiples and common factors, prime and composite numbers, the Sieve of Eratosthenes, twin primes, co-prime numbers, prime factorisation (and its uniqueness), and the divisibility tests for 10, 5, 2, 4 and 8.
Chebyshev's bias (opens another website) — Wikipediaawaiting owner check
Supports Chebyshev's 1853 observation that primes of the form 4k + 3 usually outnumber those of the form 4k + 1 up to the same limit, and that the first place where 4k + 1 takes the lead is 26,861.
End of Investigate
What you just read
- Make predictions about primes and test them with data and labs.
- Explain why every prime above 3 is one more or one less than a multiple of 6, and why 3, 5, 7 is the only prime triplet.
- Decide whether claims about primes, co-primes and divisibility are always, sometimes or never true, using counterexamples.
- Build prime deserts of any length and describe how prime gaps and twin primes behave.
- Discover the rule linking a prime factorisation to the number of factors.
- Next depthGo deeper: Go deeperMechanisms, reasoning, calculations and nuance.
- Practise79 questionsHints and a worked solution for every question — or play a 10-question round.
- Step backUnderstandGo back over the ground before this one — you can move up and down as often as you like.
- TopicAll of prime and composite numbersThe whole ladder, the connections and the words to know, on one page.
The web
Explore a connection
Builds on
Four operationsTesting whether a number is prime is just careful division: does anything divide it exactly?
Helps you understand
HCF and LCMPrime factorisation is the fastest route to both the HCF and the LCM.
Contrasts with
Number and shape patternsPrimes famously refuse to follow a simple pattern, unlike even numbers, squares or multiples.
Want to save topics or ask for new ones? Invited families can connect a learning device. Everything here stays free to read without signing in.
Revision 1 · release preview-7e1cbbcc4f · accepted 20/09/2026