This an adaptation of @PullJosh's Factor Finder that finds all the factors of numbers below 1001, then tells which locker doors are opened or closed (explained in notes and credits) Test is just to make sure my theory is right on the pattern (open, closed, closed, open, add two more than last time closed, repeat on).
Thanks to @PullJosh for the base code and my math teacher for giving me the Locker Challenge. The locker challenge is this absurdly long thing my math teacher gave me. Basically, some kids open 1000 locker doors. Then some kids close each door every so often (Student 2 opens/closes every two, Student 3 opens/closes every 3, and so on and so fourth). Then we have to find which ones are opened and closed