Maths Olympiad Prep

Library / /16 of 841

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 12550n<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(128)0n<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,000 problems in a working order, from AMC 10 level to the IMO shortlist.

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