Illustrating the Locker Problem

Requires a Wolfram Notebook System
Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.
A row of lockers starts with all lockers closed. A person walks by and opens every locker. A second person walks by and closes every other locker, starting with locker 2. A third person walks by and changes the state of every third locker, starting with locker 3. This continues up to an
person changing the
locker. Which lockers are open and which are shut after
people pass by? This Demonstration illustrates this problem with
.
Contributed by: Marc Brodie (Wheeling Jesuit University) (March 2011)
Open content licensed under CC BY-NC-SA
Snapshots
Details
I first found this locker problem in G. L. Musser and W. F. Burger, Mathematics for Elementary Teachers: A Contemporary Approach, 4th ed., New York: John Wiley and Sons, 1996.
Permanent Citation
"Illustrating the Locker Problem"
http://demonstrations.wolfram.com/IllustratingTheLockerProblem/
Wolfram Demonstrations Project
Published: March 7 2011