How many?

Suppose you’re in a hallway lined with 100 closed lockers. You begin by opening every locker. Then you close every second locker. Then you go to every third locker and open it (if it’s closed) or close it (if it’s open). (Let’s call this action toggling a locker.) Continue toggling every nth locker on pass number n. After 100 passes, where you toggle only locker #100, how many lockers are open?

Click here for the solution

10 lockers are left open, lockers #1, 4, 9, 16, 25, 36, 49, 64, 81, and 100. Each of these numbers are perfect squares. This problem is based on the factors of the locker number. Each locker is toggled by each factor; for example, locker #40 is toggled on pass number 1, 2, 4, 5, 8, 10, 20, and 40. That is eight toggles. The only way a locker could be left open is if it is toggled an odd number of times. The only numbers with an odd number of factors are the perfect squares. Thus, the perfect squares are left open. For example, locker #25 is toggled on pass number 1, 5, and 25 three toggles.

more riddles

Who was it?

A rich man named Stuart Laidlaw had been counting his money. When he finished, he accidentally left a $1000.00 bill on his desk but when he returned for it a short while later, it was gone. Only two other persons could have seen the bill. One was the cook; the other...

read more

How old is Mike?

David and Mike are brothers. David is 33 years old today. This is three times as old as Mike was when David was the age that Mike is today.How old is Mike?Mike is 22 years old.more riddlesDonec rutrum congue leo eget...

read more

How many – how much?

The engineering department was arranging for a rather expensive catered lunch to bid farewell to their retiring colleague. They calculated that it would cost each person $30. One good mathematician remarked, "It's lucky that there aren't five fewer of us to split the...

read more

Reflections

The letters on the glass doors of a beauty parlor read correctly when viewed from the street. How would this lettering appear when seen in a mirror in the parlor, which reflects it from a mirror, which reflects it from another mirror?The lettering would appear...

read more