Calculate number of 1-runs in a binary string expression
Source: Bangladesh Mathematical Olympiad 2021 Problem 7
February 26, 2022
combinatoricsnumber theory
Problem Statement
A binary string is a word containing only s and s. In a binary string, a run is a non extendable substring containing only s. Given a positive integer , let be the number of runs in the binary representation of . For example, since in binary is which has exactly three runs. What is the following expression equal to?