Compute the smallest multiple of 63 with an odd number of ones in its base two representation.
Solution
Notice that , so for any we know As long as , we know and are both integers between 0 and 63 , so the binary representation of is just followed by in binary (where we append leading 0 s to make the latter 6 digits). Furthermore, and sum to , so has 1 s in binary where has 0 s, and vice versa. Thus, together, they have six 1 s, so will always have six 1 s in binary when . We can also check has twelve 1s, while has the same binary representation with an extra 0 at the end, so it also has six 1s. Finally, has seven 1 s, so the answer is .
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.