Maths Olympiad Prep

Library / HMMT November /429 of 672

HMMT November

Number theory Difficulty 5.1 AIME, harder Find the answer

Let rkr_{k} denote the remainder when (127k)\binom{127}{k} is divided by 8. Compute r1+2r2+3r3+⋯+63r63r_{1}+2 r_{2}+3 r_{3}+\cdots+63 r_{63}.

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

Solution

Let pk=128−kkp_{k}=\frac{128-k}{k}, so (127k)=p1p2⋯pk\binom{127}{k}=p_{1} p_{2} \cdots p_{k} Now, for k≤63k \leq 63, unless 32∣gcd⁡(k,128−k)=gcd⁡(k,128),pk≡−1( mod 8)32 \mid \operatorname{gcd}(k, 128-k)=\operatorname{gcd}(k, 128), p_{k} \equiv-1(\bmod 8). We have p32=9632=3p_{32}=\frac{96}{32}=3. Thus, we have the following characterization: rk={1 if k is even and k≤317 if k is odd and k≤315 if k is even and k≥323 if k is odd and k≥32r_{k}= \begin{cases}1 & \text { if } k \text { is even and } k \leq 31 \\ 7 & \text { if } k \text { is odd and } k \leq 31 \\ 5 & \text { if } k \text { is even and } k \geq 32 \\ 3 & \text { if } k \text { is odd and } k \geq 32\end{cases} We can evaluate this sum as 4⋅(0+1+2+3+⋯+63)+3⋅(−0+1−2+3−⋯−30+31)+(32−33+34−35+⋯+62−63)=4⋅2016+3⋅16+(−16)=8064+32=8096\begin{aligned} 4 \cdot & (0+1+2+3+\cdots+63) \\ & +3 \cdot(-0+1-2+3-\cdots-30+31) \\ & +(32-33+34-35+\cdots+62-63) \\ = & 4 \cdot 2016+3 \cdot 16+(-16)=8064+32=8096 \end{aligned}

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.