## Open Lockers

Hundred Lockers is an exercise about number properties and parity.

The animation above shows the state of the lockers after each passage of Willy Wonka’s assistant.

Image [100] provides the solution.

The answer is the square numbers: 1,4,9,16,25,36,49,64,81,100.

At the end of the procedure the status of the locker (closed 0, open 1) is the number of factors of locker number N mod 2, e.g.

- locker 10: 10 has 4 factors (1,2,5,10), 4 mod 2 =0, hence the locker is closed
- locker 25: 25 has 3 factors (1,5,25) 3 mod 2 =1, hence the locker is open

Square numbers have an odd number of factors:

Every number can be expressed as the product of power of primes:

Let be the number of factors of :

For square numbers all are even, hence

Advertisements

Categories: Mathematica, Mathematics

Comments (0)
Trackbacks (0)
Leave a comment
Trackback