I suspected it has to do with the total number of divisible factors being odd number for perfect squares. Then I expanded this exercise to 16, and it turns out my theory was correct. For example, a non-perfect numbers like 12 has six (even) divisible values: 1, 2, 3, 4, 6, 12. On the other hand, a perfect number like 16 has five (odd) divisible values: 1, 2, 4, 8, 16. This theory also applies to prime number which always have two divisible values: 1 and itself.
In conclusion, the number of open lockers is the total count of perfect square values under 1,000.

Hi Raymond, I got a bit confused by your explanation and the Excel sheet. In the first row of your sheet, you marked all the lockers as closed, but in the second row (which indicates the first student’s turn), you show all the lockers being opened. However, the question states that the first student closed all the lockers. Could you clarify this part for me? Thanks!
ReplyDeleteHi Malihe, I see that now. However, it does not affect the solution as initially closed locker and be interchanged with initially open locker.
Delete