PSEUDOCODE FOR 20,000 LIGHTS

Create an array of boolean and initialize the elements to false

loop through the 20,000 bulbs with index 'i'

**loop through the multiples of 'i', setting the value of the array[i] = to the opposite of its current value

(end both loops)

print---->

loop through the 20,000 elements with index 'i'

**if array[i] == true, System.out.println(count + ". " + i)

count is a variable that should start at 0 and be incremented just before the print out.
it corresponds to the number of lights that are on.
'i' is the actual light number