Brain Teasers Optical Illusions Puzzle Hunts Codes & Ciphers Mechanical Puzzles
Personal Links
Browse Teasers
Search Teasers

100 Closed Lockers

Math brain teasers require computations to solve.

 

Puzzle ID:#7824
Fun:*** (2.83)
Difficulty:*** (2.85)
Category:Math
Submitted By:warrior***
Corrected By:sweetime

 

 

 



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?

Open Calculator

Answer

Answer: 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's eight toggles: open-closed-open-closed-open-closed-open-closed.

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): open-closed-open.

Hide




What Next?

  
  

See another brain teaser just like this one...

Or, just get a random brain teaser

If you become a registered user you can vote on this brain teaser, keep track of
which ones you have seen, and even make your own.

 





Back to Top
   


Online Now
6 users and 548 guests

Users In Chat
autumn
Follow Braingle!
Fold 'N Fly Paper Airplanes
Easy to follow folding instructions and videos.
Copyright © 1999-2017 | FAQ | Widgets | Links | Green | Subscribe | Contact | Privacy | Conditions | Advertise | Braingle Time: 9:05 am
Sign In Create a free account