MathLabs

Problem 3

For positive integer kk, let f(k)f(k) be the number of integers in {k+1,…,2k}\{k+1,\ldots,2k\} whose binary expansion has exactly three 11s. Prove every positive integer mm occurs as f(k)f(k), and determine all mm for which exactly one kk has f(k)=mf(k)=m.
Step 3 of 5: Characterize a unique kk
In plain words

Characterize a unique kk

2k−1 and 2k+1 have three 1s  ⟺  k−1 and k have two 1s2k-1\text{ and }2k+1\text{ have three }1\text{s}\iff k-1\text{ and }k\text{ have two }1\text{s}
Detailed analysis

Because increments are 00 or 11, f(k)=mf(k)=m is unique exactly when both adjacent increments are 11, i.e. when 2k−12k-1 and 2k+12k+1 each have three 11s. Appending or removing the last binary digit shows this is equivalent to k−1k-1 and kk each having two 11s.