Consider a prison with infinite rooms numbered as 1, 2, 3,......
Initially all the prison doors are locked.
An infinite number of rioters break in and disturb the rooms in the following way.
First one stops at all rooms and opens them all.
Second rioter stops at rooms numbered 2, 4, 6,...... and locks open rooms, and leaving the other rooms as they were.
The third rioter stops at rooms numbered 3, 6, 9,.... and again opens a locked room and locks an open room, leaving others undisturbed.
And this process continues.
After all the infinite rioters have left, which rooms would be open?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
because only the square numbers are reached odd number of times!!! for example: 16: is reached by 1,2,4,8,16 while 8 is reached by 1,2,4,8