Sunday, 1 June 2008

Open Doors

Another interesting problem from the book i've been reading... think about it while i go for my nephews wedding dinner ^^

in a school there're many lockers (say numbered 1-100). every morning, the one student stands in front of a locker to perform the following activity.

day 1: open all locker doors
day 2: close all doors numbered 2, 4, 6, ..., 100
day 3: toggle (toggle means close it if it was open, open it if it was closed) all doors numbered 3, 6, 9, 12, ..., 99
day 4: toggle all doors numbered 4, 8, 12, ..., 100

...

day 100: toggle door 100.

Q: after toggling door 100, how many doors remain open?

clue: think of the factors of each number... answer tomorrow.