A row of numbered lockers starts with every door closed. Children walk past one after another: child 1 flips every locker, child 2 every second one, child 3 every third, and so on, where a flip opens a closed door or closes an open one. The student types how many lockers end open or closed, picks whether one locker ends open or closed, or types how many times it is flipped. While answering they can tap the lockers to open and close them and try the first few children out by hand.
Following every child down the row is slow and easy to lose track of. The quicker way is to follow one locker: it is flipped once by each child whose number is a factor of it. Factors come in pairs, so most numbers have an even number of factors and their lockers end closed. A square number has a factor that pairs with itself, like 4 × 4 = 16, so it has an odd number and its locker ends open. In some questions fewer children come than there are lockers, so the bigger factors never get their turn and have to be left out of the count.

Numbers&Me is free. Sign up to practise more, or set it as homework in under a minute, and it marks itself.