Using a geometric series to control many LEDs

Use bits inside an int.

Assigning the value will automatically set the bits, that can be tested and pushed to the optos.