Kōkiri Learn
Looking down on a classroom carpet where the hands of several children arrange coloured square tiles into rows and rectangles, with a magnifying glass lying beside them

Mathematics and Statistics · World 7 of 8 · Years 7–8

Number Detectives: Primes, Powers and Codes

Crack codes, hunt primes and dive below zero, then build an escape room where every lock opens with number clues.

Big question: What hidden patterns live inside numbers, and how can we use them to lock and unlock secrets?

You'll make
A working escape room (or escape box) with 5–8 number locks, each with a puzzle card, a checked answer key and a hint card, ending with a coded message that teams decode. Plus a short 'how it works' poster explaining the maths behind each lock.
For
Another class during the library's Codebreakers Week, whānau at a maths evening, and the school librarian or a local library that runs holiday programmes.
Time
5 weeks · 2 sessions a week

Your mission

Why it matters

The school library is running a Codebreakers Week and has asked your class to design an escape-room challenge for other classes and whānau. Every lock in the room has to open with a number puzzle: a prime to find, a factor to spot, a temperature below zero to work out, or a secret message to decode. If a puzzle has two possible answers, or no answer at all, the team gets stuck, so every clue has to be checked like a detective checks evidence.

Numbers are not just for counting. Prime numbers keep your family's online banking safe, negative numbers tell farmers when frost is coming, and the order you do calculations in decides whether a bridge is built right or wrong. Codes have won wars and still protect every message you send. Once you can see the patterns inside numbers, you can build puzzles, spot mistakes and understand how the digital world keeps secrets.

A frosty dawn in Central Otago with white frost on the grass, bare poplar trees and pink-lit snowy mountains in the distance
Ranfurly in Central Otago holds New Zealand's record low temperature: −25.6°C. How many degrees is that below a 20°C spring day?

Your first step

Take 12 square tiles and make as many different rectangles as you can. Now try 13 tiles. What is strange about 13? Write down your theory before anyone tells you the answer.

Make it yours

Choose a context

Same big question, three different places to explore it. Pick the one that fits your class and community.

  1. An escape room in our school

    Turn the classroom or library into an escape room with padlocked boxes, envelopes and a final code. Other classes test it during Codebreakers Week, and the best puzzles go into a travelling 'escape box' for other schools.

  2. Hot and cold, high and deep: a puzzle trail of Aotearoa

    Build the puzzles from real New Zealand numbers: Ranfurly's record frost of −25.6°C, winter at Scott Base in Antarctica, the height of Aoraki/Mt Cook and the depth of the Kermadec Trench. Set it as a trail through the school, a local museum or the town library.

  3. Secret messages across the world

    Follow codes through history: Julius Caesar's shifting alphabet, Morse code on the telegraph, the Enigma machine and the codebreakers of Bletchley Park, and the prime-number maths that protects the internet today. Your escape room tells the story of codes from ancient Rome to your phone.

SOLVE

Week by week

Two sessions a week, each with Getting started and Stretch support so the whole class works together.

  1. W1Prime suspects: the building blocks of numbersSee the Pattern: The rectangle test · See the Pattern: The sieve and the cicadas
  2. W2Factor fingerprints, powers and rootsOrganise Information: Factor trees and sausage sizzles · Organise Information: Square, cube, power up
  3. W3Below zero, and rules for the order of thingsLink Ideas: Aotearoa on a number line · Link Ideas: Order matters, and the first code
  4. W4Design the locks and test themLink Ideas: Crack it, then make it · Verify: Test run: break each other's locks
  5. W5Prove it, then open the escape roomVerify: Fix and prove · Explain: Codebreakers Week
A scuba diver hovers beside a steep underwater cliff covered in orange and pink sponges, with sunlight shining down through deep blue water
Sea level is zero. A diver 18 metres down is at −18 m. Where would the top of Aoraki/Mt Cook be on the same number line?

Hands-on

Activities

Investigations and projects that fit the weeks above. Open one to see what you need and how you'll know it worked.

The rectangle testWhy can some numbers make lots of rectangles and others only one?Open

You need: 20–30 square tiles or multilink cubes per pair · Grid paper · Recording table

  1. Pick a number from 1 to 30 and count out that many tiles.
  2. Make a rectangle with every tile used. Record its size, like 3 × 4.
  3. Find every different rectangle (a 3 × 4 turned around is the same one).
  4. Repeat for every number to 30 and colour the numbers that make only one rectangle.
  5. Look at your coloured numbers. What do they have in common?

How you'll know: You can explain that a prime number has exactly two factors, 1 and itself, and show it with tiles.

Go further: Which numbers make a square as one of their rectangles? What do you notice about how many rectangles they have?

Fits week 1 →
Sieve of EratosthenesCan we find every prime number up to 100 without testing each one?Open

You need: A hundreds board (1–100) per student · Four coloured pencils

  1. Cross out 1. It is not prime.
  2. Circle 2. Cross out every other multiple of 2 in one colour.
  3. Circle 3. Cross out every multiple of 3 you have not already crossed out, in a new colour.
  4. Do the same for 5 and 7.
  5. Circle every number left. Count them and check with a partner.
  6. Why did you only need to go up to 7? (Hint: 7 × 7 = 49 and 11 × 11 = 121.)

How you'll know: Your board shows 25 primes below 100, and you can explain why no multiple of 2, 3, 5 or 7 is left.

Go further: Use divisibility rules to check whether 91, 119 and 221 are prime. Which one is the trickiest?

Fits week 1 →
Sausage sizzle mathsHow do HCF and LCM solve real planning problems?Open

You need: Grid paper · Counters in two colours · Problem cards

  1. Sausages come in packs of 8, buns in packs of 12. List multiples of 8 and of 12. Circle the first number in both lists (the LCM).
  2. Check with counters: how many packs of each do you need?
  3. Now the HCF: 24 kapa haka performers and 36 visitors are split into groups of equal size, and every group has only performers or only visitors. What is the largest group size?
  4. Draw factor trees for 24 and 36. Find the HCF and LCM from the primes they share.
  5. Write your own HCF or LCM problem about a real school event.

How you'll know: You can solve both problems two ways (lists and factor trees) and get the same answer.

Go further: Two buses leave the school stop together, one every 12 minutes and one every 20. When do they next leave together?

Fits week 2 →
Power towerHow fast do squares, cubes and doubles grow?Open

You need: Multilink cubes · A sheet of A4 paper · Calculator · Table template

  1. Build squares with side 1, 2, 3 and 4. Record the area as a power: 3 × 3 = 3².
  2. Build cubes with side 1, 2 and 3. Record the volume: 2 × 2 × 2 = 2³.
  3. Fill in the square root and cube root column: √16 = 4, ∛27 = 3.
  4. Fold a sheet of paper in half, then again. Record the layers each time: 2, 4, 8, 16…
  5. Predict the layers after 10 folds and check on a calculator (2¹⁰).

How you'll know: Your table shows the square, cube and root for each side length, and you can say why doubling gets big so quickly.

Go further: A sheet of paper is about 0.1 mm thick. How thick would it be after 20 folds? Compare it with a real NZ building or mountain.

Fits week 2 →
Aotearoa number lineHow do negative numbers help us describe Aotearoa's hottest, coldest, highest and deepest places?Open

You need: Two long strips of paper or masking tape for the corridor · Fact cards · Marker pens · Metre ruler

  1. Tape a vertical temperature line from −30°C to 40°C and a height line with sea level at 0.
  2. Place fact cards: Ranfurly −25.6°C, Scott Base in winter, a Central Otago summer day, your town today, freezing point 0°C.
  3. On the height line add: a diver at −18 m, the school at its height above sea level, a local hill, and a note that Aoraki/Mt Cook (3,724 m) and the Kermadec Trench (about −10,000 m) are too far to fit.
  4. Use the line to find differences: count up to zero, then past it.
  5. Write three puzzle questions for the escape room from your line.

How you'll know: You can find the difference between a positive and a negative number by counting through zero and show it on the line.

Go further: Scale the height line so Aoraki/Mt Cook and the Kermadec Trench both fit on the corridor wall. What scale did you use?

Fits week 3 →
Four 4s and the calculator battleWhy do mathematicians agree on an order of operations?Open

You need: Two or three different calculators (including a phone) · Whiteboards · GEMA card

  1. Type 3 + 4 × 2 into each calculator. Record what each shows.
  2. Talk: which answer follows GEMA? Grouped (brackets), Exponents, Multiply and divide, Add and subtract, left to right.
  3. Four 4s: make every number from 0 to 10 using exactly four 4s, for example (4 + 4) ÷ (4 + 4) = 1.
  4. Swap with a partner. They check each answer step by step using GEMA.
  5. Write a lock clue whose answer changes if someone ignores the order of operations.

How you'll know: Your partner can follow every one of your Four 4s answers and get the same result.

Go further: Using √ and powers is allowed. Can you make 11 to 20 with four 4s?

Fits week 3 →
Caesar wheel and frequency detectiveHow can a code be broken without the key?Open

You need: Cipher wheel template (two card circles) · Split pin · Scissors · Coded messages · Tally chart

  1. Cut out the two circles and join them at the centre with a split pin.
  2. Set a shift (for example A → D) and encode a short message. Swap and decode.
  3. Now take a long message with an unknown shift. Tally how often each letter appears.
  4. The most common letter in English is usually E. Work out the shift from your tally and test it.
  5. Try the same idea with a message in te reo Māori. Which letters are most common? Why does the alphabet you use change the pattern?

How you'll know: You can decode a message without being told the shift, and explain how the letter counts gave it away.

Safety: Cut the card carefully and keep split pins away from mouths.

Go further: A Caesar cipher only has 25 possible shifts. How many keys would a code have if every letter could be swapped for any other letter? (Hint: 26 × 25 × 24 × …)

Fits week 3 →
Build and test an escape-room lockDoes our puzzle have exactly one answer, and can someone else find it?Open

You need: Combination padlock, lock box or zip bag with a paper lock card · Puzzle card template · Hint card · Answer key · Stopwatch

  1. Choose your lock's maths: primes, factors, powers, integers, order of operations or a cipher.
  2. Write the puzzle so its answer is the lock's combination (for example a 3-digit number).
  3. Solve it yourselves two different ways and write the answer key with a short proof.
  4. Give it to a test group. Record: solved, solved with hint, stuck, or found a different answer.
  5. Fix any problem and test with a new group.

How you'll know: A new group solves your lock in under 8 minutes, gets the answer you planned, and can explain the maths.

Safety: Never lock doors, cupboards or people. A teacher keeps a list of every combination.

Go further: Link two locks so the answer to one becomes part of the next. Check the chain still has only one path.

Fits week 4 →
An Enigma cipher machine in its wooden case, with rows of round lettered keys, a panel of lamps and three rotor wheels
An Enigma machine. Its spinning rotors changed the code with every key press. Codebreakers at Bletchley Park in England, including Alan Turing, used maths and patterns to crack it.Photo: Rama, Wikimedia Commons, CC BY-SA 2.0 FR

Background reading

Read to understand

Short readings written for Kōkiri Learn students, with their sources.

Trusted NZ sites

Explore more

Placed at the stage of the journey where each one helps.

Beyond the classroom

Share it and work together

Real audiences

  • Another class playing the escape room during the library's Codebreakers Week
  • Whānau at a maths evening or school open day
  • The school librarian or a local library's school holiday programme team

Work with other schools

  • Swap escape boxes with a class at another school by courier: each class solves the other's locks and sends back a results table and one suggested fix.
  • Run a code exchange: partner schools send each other Caesar-coded messages about their local area, with the shift hidden in a prime or integer puzzle.
  • Build a shared 'Aotearoa number line' online with a partner school in a different region, each adding local temperature, height and depth facts.

Stretch challenges

  • The largest known prime, found in 2024, has more than 41 million digits. Find out how it was found and why primes of the form 2ⁿ − 1 are hunted.
  • Build a Caesar cipher for the te reo Māori alphabet (a, e, h, i, k, m, n, o, p, r, t, u, w, ng, wh). How many shifts are possible?
  • Try the 'easy to multiply, hard to split' test: multiply two primes such as 61 × 53 on a calculator, then give the answer to a friend and time how long it takes them to find the two primes. This is the idea behind internet security.
  • Goldbach's conjecture says every even number bigger than 2 is the sum of two primes. Test it for every even number up to 60. Nobody has proved it yet.

New Zealand Curriculum

What this world covers

Mapped to the refreshed Phase 3 statements. The whole class covers both the Year 7 and Year 8 sequences over two years.

  • Mathematics and Statistics · Number

    Prime and composite numbers (identifying primes to 100), divisibility rules for 2, 3, 4, 5, 6, 8, 9 and 10, and finding the HCF and LCM of two numbers

    Year 7 sequence

  • Mathematics and Statistics · Number

    Exponent notation with positive exponents, identifying square roots of square numbers, locating and ordering integers on a number line, and evaluating expressions using the order of operations

    Year 7 sequence

  • Mathematics and Statistics · Number

    Expressing whole numbers as a unique product of prime factors using exponents (e.g. 36 = 2² × 3²), evaluating square and cube roots, and evaluating expressions with integers using the order of operations

    Year 8 sequence

  • Mathematics and Statistics · Algebra

    Non-linear patterns: square and cube numbers, recognising and generalising the pattern in a table

    Year 8 sequence

  • Technology · Digital technologies

    How data is encoded: substitution ciphers, patterns that give codes away, and why strong encryption and passwords matter

    Year 8 sequence

For teachers: how to run it

Prep: collect 20–30 square tiles or multilink cubes per group, hundreds boards (1–100), grid paper, calculators, envelopes and a few cheap combination padlocks or lockable boxes (3- and 4-digit locks work best; a zip bag with a paper 'lock' card works too). Print a split-pin Caesar cipher wheel template (CS Unplugged and many free sites have one) and a NZ number line from −30 to 40 for the corridor. Maths focus: this world covers the Phase 3 number content taught across Years 7 and 8: primes to 100 and divisibility rules for 2, 3, 4, 5, 6, 8, 9 and 10; HCF and LCM; exponents, square roots and cube roots; prime factorisation with exponent notation; locating, ordering, adding and subtracting integers; and the order of operations (the teaching sequence suggests the mnemonic GEMA: grouped, exponents, multiplicative, additive). Keep a class 'evidence wall' where conjectures (for example 'every prime after 2 is odd') are posted and then proved, disproved or left open. Safety: the escape room uses paper, envelopes and padlocks only; no locking of doors, cupboards or people, keep exits clear, and have a teacher-held master key or combination list. Coding context: when discussing Enigma and the Second World War keep the focus on the maths and the people who solved the problem; avoid graphic war detail. Online safety: link public-key maths to why we never share passwords, using Netsafe material if helpful. Differentiation: start with arrays and factors of numbers up to 30 and single-step integer problems on a vertical number line; extend to prime factorisation with exponents, cube roots, multi-step integer expressions with brackets, frequency analysis of longer ciphertext, and the RSA-style 'easy to multiply, hard to factorise' idea. Pair students so one builds and one checks; the checker's job is to find a second answer or a flaw. Tohu asks one question when a group tests a puzzle: how do you know there is only one answer? It never gives answers. Links: pairs well with Kōkiri Lab digital technology worlds (binary and encoding) and with the Games of Chance world in this learning area.

Plan this world into any term with the two-year planner. Students can record their thinking in their Kōkiri Learn portfolio.

Ready to run it with your class?

Free trial for NZ schools. One combined Years 7–8 class, any term.