CombinatoricsDifficulty 5.8AIME, harderProve itUnited States
Problem:
For any positive integers a and b, define a⊕b to be the result when adding a to b in binary (base 2), neglecting any carry-overs. For example, 20⊕14=101002⊕11102=110102=26. (The operation ⊕ is called the exclusive or.) Compute the sum k=0∑22014−1(k⊕⌊2k⌋) Here ⌊x⌋ is the greatest integer not exceeding x.
Solution
Solution:
Answer: 22013(22014−1) OR 24027−22013
Let k=a2013a2012…a0 in base 2. Then ⌊2k⌋=0a2013…a1 in base 2. So the leftmost digit of k⊕⌊2k⌋ is 1 if and only if a2013=1, and the nth digit from the right is 1 if and only if an=an−1 (1≤n≤2013).
In either case, the probability of each digit being 1 is 21. Therefore, the sum of all such numbers is 21⋅22014⋅2014 digits 11…112=22013(22014−1)
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.
Source: MathNet,
licensed CC-BY-4.0.
Statement reproduced verbatim; metadata (topic, difficulty) added by this project.