Problem

Source: IMO 1994, Problem 3, IMO Shortlist 1994, N5

Tags: function, number theory, equation, binary representation, IMO, IMO 1994



For any positive integer $ k$, let $ f_k$ be the number of elements in the set $ \{ k + 1, k + 2, \ldots, 2k\}$ whose base 2 representation contains exactly three 1s. (a) Prove that for any positive integer $ m$, there exists at least one positive integer $ k$ such that $ f(k) = m$. (b) Determine all positive integers $ m$ for which there exists exactly one $ k$ with $ f(k) = m$.