Question 7
Combinatorics · Number theory BDMO 2021 National
A binary string is a word containing only 0s and 1s. In a binary string, a 1-run is a non-extendable substring containing only 1s. Given a positive integer , let be the number of 1-runs in the binary representation of . For example, since 107 in binary is 1101011 which has exactly three 1-runs. What is the following expression equal to?