Power of Four
Recognize the pattern
Brute force idea
The naive version of Power of Four sounds like this: keep dividing by 4 until you either land on 1 or break clean divisibility. That direct path works, but it never reveals the bit pattern that makes the check feel almost immediate.
Better approach
The deeper shift in Power of Four is this: first confirm the number is a power of two, then confirm that its single set bit sits in an even position. The mask 0x55555555 marks exactly those even positions, so the pattern of the bits tells you whether the number truly belongs. Once you hold onto the right piece of information from moment to moment, the problem feels less like trial and error and more like following a shape that was there all along.
Key invariant
At the center of Power of Four is one steady idea: Powers of 4 are powers of 2 where the single set bit is at an even position (bit 0, 2, 4,..). The mask 0x55555555 has 1s only at even positions, so AND-ing filters for this. When you keep that truth intact, each local choice supports the larger solution instead of fighting it.
Watch out for
One easy way to drift off course in Power of Four is this: Not understanding why power of 2 isn't enough — 8 (1000) is a power of 2 but its set bit is at position 3 (odd), so it's not a power of 4. The fix is usually to return to the meaning of each move, not just the steps themselves.