There are $150$ switches. First, You turn on all $150$ switches.Next, you turn off the even indexes.Then you toggles every third index and turn it off if it is on or turn it on if it is off. After $150$th pass. in which you toggle only switch number $150$, how many switches are on?
I solved it "brut force" and I found that the answer is $75$ (correct me if I'm wrong)
But I'm looking for explanation "number theory" style.
Attempt:
$1.$ turn on all $150$ switches
$2.$ turn off all index $i=0\pmod 2$
$3.$ something $\pmod 3$

Hint:
Go through $16$ or $17$ switches as a trial run and see what you notice about which switches are still on.
Answer: