AoPS Wiki:Problem of the Day/August 23, 2011

Twenty bored students take turns walking down a hall that contains a row of closed lockers, numbered $1$ to $20$. The first student opens all the lockers; the second student closes all the lockers numbered $2$, $4$, $6$, $8$, $10$, $12$, $14$, $16$, $18$, $20$; the third student operates on the lockers numbered $3$, $6$, $9$, $12$, $15$, $18$: if a locker was closed, he opens it, and if a locker was open, he closes it; and so on. For the $i^{\text{th}}$ student, he works on the lockers numbered by multiples of $i$: if a locker was closed, he opens it, and if a locker was open, he closes it. What is the number of the lockers that remain open after all the students finish their walks?