Non-negative Integers without Consecutive Ones
Count the integers from zero up to n whose binary form never has two adjacent ones. The visual builds a bit-by-bit tree and prunes branches that would create a forbidden pair.
Count the integers from zero up to n whose binary form never has two adjacent ones. The visual builds a bit-by-bit tree and prunes branches that would create a forbidden pair.