A door is toggled as many times as its number has divisor(this is obvious from the patterns shown in the question).
Divisors come in pairs: 2*3,6*1,1*5
So door with number having even divisors are finally closed.
Numbers which have odd number of divisors are perfect squares.So 1,4,9,16,25,36,….484 are doors that are open at the end!