Every day, \(100\) students enter a school that has \(100\) lockers. All the lockers are closed when they arrive.
Student \(1\) opens every locker.
Student \(2\) closes every second locker.
Student \(3\) changes the state of every third locker i.e. he opens it if it is closed and closes it if its open.
Student \(4\) changes the state of every fourth locker and so on... so that student \(n\) changes the state of every \(nth\) locker.
One day several students are absent. Regardless, those present complete the procedure and simply skip the students who are absent. For e.g. if student \(3\) is absent, then nobody changes the state of every third locker.
Satyen Nabar discussed the problem when one door was opened and all others were closed.This inspired me and tried to interpret the situation when 2 doors are opened and all the others are closed.
I took two cases
\(Case 1:\) Here after 100th operation locker number \(1,2\) were opened and all others were closed.I found that \((2*3=6,2*5=10,2*7=14,2*11=22,..........,2*47=94)\)and \((8,16,32,64)\),\((9.27,81)\),\((25)\),\((49)\) student nos who were absent.So total \(14+4+3+1+1=23\) students were absent.
\(Case 2:\)In this case after 100th operation locker number \(2,4\) were opened and all other were closed.Here I found that \(26\) students were present.Student no \(2,6,10,14,18,.......,98\) and \(4\)(which is an exception).So in this case \(74\)students were absent.
Anyone please confirm these two answers and help me to generalize the problem.