Mathematics Ages 13–14

The 100-lockers puzzle

100 lockers, 100 students. Exactly 10 end open, every time.

A 27-slide maths lesson that solves the 100-lockers puzzle with factors. Students find out why only square numbers have an odd number of factors, then count squares with square roots.

The short answer

In the 100-lockers puzzle, exactly 10 lockers end open: 1, 4, 9, 16, 25, 36, 49, 64, 81 and 100. Each locker is changed once for every factor of its number. Factors come in pairs, except in a square number, where one factor pairs with itself, so only squares have an odd number of factors and end open.

Inside the deck

slides
27
quiz questions
8
minutes
60
your-turn tasks
8

Choose a format

  • Lesson Notes (PDF)Every slide with its teacher notes, as a PDF to read or print.
  • Teacher DeckThe editable PowerPoint with speaker notes on every slide, a PDF copy and the matching Vesper slide template, so you can add slides of your own.
Pricing coming soon

Pricing coming soon

We’ll email you pricing and launch offers shortly.

  • Finished and checked: buying opens soon
  • Sources listed at the end
  • Curriculum links under ‘Curriculum & specs’
  • For one classroom. Campus licences for whole schools

Key facts

  • Exactly 10 of the 100 lockers end open: the square numbers 1 to 100.
  • Locker 12 has 6 factors and ends shut; locker 16 has 5 factors and ends open.
  • With 1,000 lockers, 31 end open, because 31² = 961 and 32² = 1,024.
  • The gaps between square numbers are the odd numbers: 1 + 3 + 5 + 7 + 9 = 25.
  • A locker changed exactly 3 times is the square of a prime, such as 9.

What students will be able to do

  • Students can list factors and factor pairs of a number.
  • Students can explain why only square numbers have an odd number of factors.
  • Students can solve the 100-lockers puzzle and justify the answer.
  • Students can use square roots to count the square numbers up to any limit.
  • Students can recognise cube numbers and squares of primes.

About this lesson

What students discover

A hundred closed lockers, a hundred students, one rule: student k changes every k-th locker, open to shut or shut to open. How many end open? Students guess (about 50? exactly 10? none?), then play a 10-locker version on a dot table and spot the pattern. Locker 12 is changed once for each of its six factors, so it ends shut. Locker 16 has five factors (1, 2, 4, 8, 16), so it ends open.

Rectangles drawn to scale show why. Factors come in pairs (12 = 1 × 12 = 2 × 6 = 3 × 4), except in a square, where one factor pairs with itself (4 × 4). So exactly 10 lockers stay open: the squares from 1 to 100. Priya’s ‘locker 50 ends open’ is the spot-the-mistake. Square roots then count the open lockers for any number: with 1,000 lockers, 31² = 961 fits and 32² = 1,024 doesn’t, so 31 stay open. Bonus patterns follow: the gaps between open lockers are the odd numbers (1 + 3 + 5 + 7 + 9 = 25), lockers changed exactly three times are squares of primes, and 64 is both a square and a cube.

Inside the deck

27 slides on the Blueprint template: a guess-first hook, a primer on factors, a diagram walk, eight your-turn tasks with answers, two checkpoints, a myth slide (‘it’s random, so about half end open’) and a real-world slide on square floors of tiles. An eight-question quiz has explained answers. The full puzzle was checked by simulation.

How to teach it

About 60 minutes. The coin version (20 coins, all tails up, 20 rounds of flipping) works on any desk and should leave heads on 1, 4, 9 and 16. Speaker notes sit on every slide.

Who it’s for

Learners aged 13–14 working on factors, squares and square roots, and maths clubs that like a puzzle with a proof at the end.

Curriculum & specs

CBSE/NCERT (India)Class 8 · Class 8 Ganita Prakash Part I ch 1 A Square and a Cube
CambridgeLS Maths Stage 7 Number (squares, factors)
IB MYPMathematics · KC Logic · RC Patterns · Crit B
Ages13–14
LevelMiddle
Slide templateBlueprint
Slides27
Teaching timeAbout 60 minutes
LanguageEnglish (UK)

Questions

Questions, answered

What is the answer to the 100 lockers puzzle?

Exactly 10 lockers end open: 1, 4, 9, 16, 25, 36, 49, 64, 81 and 100, the square numbers.

Why do only square numbers have an odd number of factors?

Factors come in pairs that multiply to the number. In a square, one factor pairs with itself (4 × 4 = 16), so it is counted once and the total is odd.

How many lockers stay open with 1,000 lockers?

31, because there are 31 square numbers up to 1,000: 31² = 961 and 32² = 1,024.

How do you find the number of factors of a number?

List the factor pairs: 18 = 1 × 18 = 2 × 9 = 3 × 6, so 18 has 6 factors.

Is there a hands-on version of the lockers puzzle?

Yes. Line up 20 coins tails up and, in round k, flip every k-th coin. After 20 rounds, heads show on 1, 4, 9 and 16.

What age is this maths puzzle lesson for?

Ages 13–14. It takes about 60 minutes and includes an eight-question quiz.

Main sources

  1. G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 6th edn, Oxford University Press, 2008 (number of divisors)
  2. OEIS A000290 (the squares) and A000005 (number of divisors), oeis.org
  3. The full 100-locker puzzle was simulated in Python (src/verify.py): open lockers 1, 4, 9, … 100

The full source list is on the last slides of the deck. Spotted an error? Tell us.