Imagine a hallway with closed doors, all of which are initially closed. The first person to come
opens them all, the second one changes the state of every other door, the third one does this to every
third door, and so forth until the hundredth changes the hundredth door. At the end of this process,
which doors remain open?
Proposed by Julio Mulero on behalf of the RSME, on the occasion of the International Day of Mathematics.
Phrasing the statement into mathematical terms, one can see that the th person opens the th door if
and only if divides ; thus the problem becomes studying which numbers have an odd number of divisors.
Recall now the fundamental theorem of arithmetic, which states that each natural number can be factored as a unique product of powers of primes, that is, Prime numbers are the building blocks of the natural numbers, so for a number to be a divisor of , it must have smaller or equal 's than when factorized, which therefore leaves a total of We want this product to be odd, so each individual factor must be odd itself – otherwise the entire expression becomes even –, hence each is even, so is a perfect square! The converse is also true, since each perfect square has squared primes as factors. Therefore, since there are perfect squares between and , namely , , , , , , , , , and , these positions will stay open at the end.
Recall now the fundamental theorem of arithmetic, which states that each natural number can be factored as a unique product of powers of primes, that is, Prime numbers are the building blocks of the natural numbers, so for a number to be a divisor of , it must have smaller or equal 's than when factorized, which therefore leaves a total of We want this product to be odd, so each individual factor must be odd itself – otherwise the entire expression becomes even –, hence each is even, so is a perfect square! The converse is also true, since each perfect square has squared primes as factors. Therefore, since there are perfect squares between and , namely , , , , , , , , , and , these positions will stay open at the end.