Skip to content

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.

Start at chapter 1

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:

  1. Predict first. Write your guess before you test. A wrong prediction you can explain teaches more than a right guess you cannot.
  2. Collect evidence. Try many cases, including awkward ones: small numbers, big numbers, even and odd.
  3. 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

Between 1 and 100 there are 25 primes. About how many primes do you expect between 1 and 1,000?

TableHow many primes up to 10, 100, 1,000, …? (Counted by computer.)
Up toNumber of primesShare that are primeAverage gap between primes
10440.0%about 2.5
1002525.0%about 4.0
1,00016816.8%about 6.0
10,0001,22912.3%about 8.1
100,0009,5929.6%about 10.4
1,000,00078,4987.8%about 12.7
The prime count grows, but more and more slowly

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
TablePrimes in each hundred up to 1,000
BlockPrimesBlockPrimes
1–10025501–60014
101–20021601–70016
201–30016701–80014
301–40016801–90015
401–50017901–100014

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

On a grid with 6 columns, which columns will contain primes after the first row?

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.

Need a different angle?

Try it

Which statement is always true?

Predict first

Now use a grid with 4 columns. Apart from 2, which columns can hold primes, and will the primes be shared evenly between them?

Chapter 03

What digit do primes end in?

Predict first

Look at the primes up to 1,000, apart from 2 and 5. Which last digits can they have?

TableLast digits of the primes up to 1,000
Last digitHow many primesExamples
14011, 31, 41, 61, 71, 101
3423, 13, 23, 43, 53, 73
7467, 17, 37, 47, 67, 97
93819, 29, 59, 79, 89, 109
2 or 52Only 2 and 5 themselves
0, 4, 6 or 80None: 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.
Need a different angle?
TableTwin prime pairs by the hundred in which the smaller prime lies, up to 1,000
HundredTwin pairsHundredTwin pairs
0–998500–5993
100–1997600–6993
200–2994700–7990
300–3992800–8995
400–4993900–9990

Predict first

The number between a pair of twin primes (like 12 between 11 and 13, or 30 between 29 and 31). Apart from the pair (3, 5), what is always true about it?

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?

TableRemainders when n, n + 2 and n + 4 are divided by 3
If n leaves remainder…n + 2 leavesn + 4 leavesWhich one is a multiple of 3?
021n itself
102n + 2
210n + 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.

  1. Two consecutive numbers are always co-prime.
  2. Two consecutive odd numbers are always co-prime.
  3. Two consecutive even numbers are always co-prime.
  4. If a and b are co-prime, then a and a + b are co-prime.
  5. A prime and any other number are co-prime.
  6. 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.

Need a different angle?
TableVerdicts on the six co-prime claims
ClaimVerdictEvidence or reason
1. Consecutive numbersAlwaysA common factor would divide their difference, which is 1. So the HCF is 1.
2. Consecutive odd numbersAlwaysA 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 numbersNeverBoth are even, so they share 2. Example: 10 and 12.
4. a, b co-prime ⇒ a and a + b co-primeAlwaysA 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 numberSometimes7 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-primeFalse (sometimes co-prime)8 and 15, 4 and 9 and 25 and 36 are co-prime pairs of composites.

Predict first

Pick two different numbers from 1 to 10. There are 45 possible pairs. About how many of them are co-prime?

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.

  1. n = 0 → 41
  2. n = 1 → 43
  3. n = 2 → 47
  4. … all prime …
  5. 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.

Need a different angle?

Predict first

Every even number from 4 to 100 can be written as the sum of two primes (try a few!). What about odd numbers? Which odd numbers above 3 are the sum of two primes?

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.

TableRecord prime gaps below 1,000: each gap is bigger than any before it
GapBetweenComposites in a row
12 and 30
23 and 51
47 and 113
623 and 295
889 and 977
14113 and 12713
18523 and 54117
20887 and 90719

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.

Round 1 / 10★ 0 ptsBest: 0
16

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.

Need a different angle?
TableNumber of factors and prime factorisation: spot the rule
NumberIndex formPowers + 1Number of factors
844
122² × 33 × 26
162⁴55
182 × 3²2 × 36
302 × 3 × 52 × 2 × 28
362² × 3²3 × 39
482⁴ × 35 × 210
602² × 3 × 53 × 2 × 212
722³ × 3²4 × 312
1002² × 5²3 × 39
3602³ × 3² × 54 × 3 × 224

Predict first

How many numbers below 100 have exactly three factors?

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 shown

A 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 shown

The 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

Which test correctly checks whether a number is divisible by 12?

Contrasts with

Number and shape patterns

Unlike 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 handling

Counting primes per block, last digits and gaps is data handling: tallies, tables and spotting trends.

Chapter 11

Findings and a check

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.

  1. Q1How many primes are there up to 1,000?
  2. Q2On a 6-column grid, primes above 3 appear only in the columns under…
  3. Q3Which of these is of the form 6k + 1 but is not prime?
  4. Q4Why is 3, 5, 7 the only set of three primes each 2 apart?
  5. Q5n × n + n + 41 is prime for n = 0 to 39. What happens at n = 40?
  6. Q6The number between the twin primes 101 and 103 is 102. It is a multiple of…
  7. Q7Are two consecutive odd numbers always co-prime?
  8. Q82 × 3 × 4 × 5 = 120. Which of these is guaranteed composite by the prime-desert trick?
  9. Q9Which number has exactly three factors?
  10. Q10A number is divisible by 24 exactly when it is divisible by…

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.

The web

Explore a connection

  • Builds on

    Four operations

    Testing whether a number is prime is just careful division: does anything divide it exactly?

  • Helps you understand

    HCF and LCM

    Prime factorisation is the fastest route to both the HCF and the LCM.

  • Contrasts with

    Number and shape patterns

    Primes 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