Share
Explore BrainMass

Closed Locker Problem

School is about to begin. The janitor has all the lockers closed. All 1000 of them.

Student #1 comes along and opens ALL of the lockers.

Student #2 comes along and closes doors 2, 4, 6, 8, 10, etc....

Student #3 comes along and changes the state of every 3rd locker ( 3, 6, 9, 12, 15).

Student #4 comes along and changes the state of every 4th locker (4, 8, 12, 16).

Student #5 comes along and changes the state of every 5th locker (5, 10, 15, 20)

Student #6 comes along and changes the state of every 6th locker (6, 12,18. 24)

It keeps going until all 1000 students go through. What lockers are closed?

Solution Preview

We consider the number 30n+k, where k=0,1,2,...,29.

Student #1 comes along and opens ALL of the lockers.
Then all the lockers are open.

Student #2 comes along and closes doors 2, 4, 6, 8, 10, etc....
Then the closed lockers are 30n+k, ...

Solution Summary

A closed locker problem is solved. The response received a rating of "5/5" from the student who originally posted the question.

\$2.19