The Locker Puzzle: Hunting for Factors
Aim
Model the 100-locker puzzle with numbered cards, count the factors of a number by listing its factor pairs, and discover that a number has an odd number of factors exactly when it is a perfect square.
Apparatus
- 30 index cards, paper slips or bottle caps, numbered 1 to 30
- Two-coloured counters, or red and green sticker dots, for closed and open
- Squared or dot-grid paper notebook
- Coloured pencils or sketch pens, at least 3 colours
- Ruler and pencil
Procedure
- Lay the cards 1 to 30 red side up. Student k turns every k-th card — tap the students.
- Record the cards that end green (open) and the cards turned exactly twice.
- For 6, 9, 12, 16, 25, 30, 36 and 49 write the factor pairs and all the factors.
- Draw each factor pair as a rectangle of dots on grid paper.
- Count the factors, mark odd or even, and compare with the open lockers.
- Complete the sentence about when a locker stays open.

Interactive 3D Experiment
Loading simulation…
What to observe
- Lockers 1, 4, 9, 16 and 25 are left open — the perfect squares.
- A locker is turned once for every factor of its number.
- Factors come in pairs of two different numbers; a square's middle pair (4 × 4) repeats one, so the count is odd.
- Lockers turned exactly twice are the primes 2, 3, 5, 7, 11, …
Notes
- This is the famous "100 lockers problem". Locker n is turned once for every factor of n.
- The number of factors of n is written d(n). For example d(36) = 9 and d(37) = 2.
- A prime has only 1 and itself as factors, so its locker is touched exactly twice.
- Number the cards clearly and keep them in order. A card out of place changes the result.
- In each round turn over every card of that multiple. Missing one gives a wrong colour.
- List factor pairs in a fixed order starting with 1 × n, so none is left out or repeated.
- When a factor is its own partner (4 × 4), write it only once in the list of factors.
- Count the number of factors, not the number of factor pairs.
- Draw the dot rectangles along the grid lines, so a 2 × 6 rectangle has 2 rows of 6 dots.