On the Subject of Not The Binary Light

Are you absolutely sure this isn’t the wrong light?

See Appendix: The Light of The Light for help identifying the various versions of The Light.

This module involves reaching a goal number through submitting a series of x2 and -1 steps. If the module doesn’t toggle between unlit state and a Black light every tap, you’re looking at a different module.

To start with, find the Goal Number by simply arranging all the digits in the serial number in order (eg: 1C4XC6 would become 146). Your goal is to reach this exact number through a series of x2 and -1 steps, starting from 1, without going below 1 or above at most 1 above the goal number.

By default, you can submit x2 by long-pressing on the lit (Black) Light, and -1 by long-pressing on the unlit Light. However, after every step, those roles might swap, or swap back. After every submission, take the newly reached number, square it, and take just the middlemost digit (or the right middle digit for even numbers). If that digit is odd, the roles of the Light states swap.

The module is solved once you reach exactly the Goal number.

You can easily find the minimum steps to reach any number simply by starting with the goal number, dividing by 2 whenever the number is even, and adding 1 whenever the number is odd.