Maths Olympiad Prep

Library / HMMT February /25 of 1302

HMMT February

Number theory Difficulty 4.6 AIME Find the answer

Let s(n)s(n) denote the number of 1's in the binary representation of nn. Compute 1255∑0≤n<162n(−1)s(n)\frac{1}{255} \sum_{0 \leq n<16} 2^{n}(-1)^{s(n)}

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

Notice that if n<8,(−1)s(n)=(−1)⋅(−1)s(n+8)n<8,(-1)^{s(n)}=(-1) \cdot(-1)^{s(n+8)} so the sum becomes 1255(1−28)∑0≤n<82n(−1)s(n)=\frac{1}{255}\left(1-2^{8}\right) \sum_{0 \leq n<8} 2^{n}(-1)^{s(n)}= 45 .

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.