100 doors start closed, numbered 1 to 100
100 doors start closed, numbered 1 to 100. Over 100 rounds: in round k, every door whose number is evenly divisible by k gets toggled (e.g. round 3 toggles doors 3, 6, 9, 12...). Ananya thinks that after 100 rounds, a random-looking scattering of doors will be open, with no clean pattern. Her friend says the open doors will follow a clean mathematical pattern. Who is right?
Who do you think is right? Pick one.
The answer: Her friend is right — the doors left open are exactly the perfect-square numbers: 1, 4, 9, 16...
Why
Ananya's guess seems reasonable, since 100 rounds of toggling in different patterns does sound chaotic — but each door's final state depends on a very countable thing: how many times it gets toggled, which equals how many numbers evenly divide that door's number (its divisors). A door toggled an EVEN number of times ends up back where it started (closed, since it began closed); a door toggled an ODD number of times ends up open. Most numbers have divisors that pair up neatly — for door 12, divisors are 1&12, 2&6, 3&4, three matching pairs, an even total of 6 divisors, so door 12 ends closed. Perfect squares are the exception: door 16's divisors are 1&16, 2&8, 4&4 — but 4 pairs with ITSELF, since 4×4=16, so that pair only counts once, leaving an odd total of 5 divisors, meaning door 16 ends open. Test it: this self-pairing only happens for perfect squares (1, 4, 9, 16, 25, 36, 49, 64, 81, 100 — exactly 10 of them up to 100), because only a perfect square has one divisor that multiplies by itself to reach the number. Her friend is right: exactly the 10 perfect-square-numbered doors end up open — a genuinely precise mathematical pattern, not randomness, comes out of what looks like a messy toggling process.
On Socho, you explain your thinking out loud and a coach asks about YOUR reasoning — one question a day, free, in Hindi, Hinglish or English.
Try a question on Socho →More disagreements in Classic Mind-benders