2004 AIME II Problem 10

Attempt Problem 10 of the 2004 AIME II below, then check your answer against the professionally curated solution from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2004 AIME II solutions, or check the answer key.

All problems are used with official legal permission of the Mathematical Association of America (MAA).

10.

Let S\mathcal{S} be the set of integers between 11 and 2402^{40} whose binary expansions have exactly two 11's. If a number is chosen at random from S,\mathcal{S}, the probability that it is divisible by 99 is pq,\frac{p}{q}, where pp and qq are relatively prime positive integers. Find p+q.p + q.

Answer: 913
Concepts:number basemodular exponentiationmultiplicative ordercounting pairs
Difficulty rating: 2920
Solution:

The set S\mathcal{S} consists of the (402)=780\binom{40}{2} = 780 numbers 2a+2b2^a + 2^b with 0a<b39.0 \le a \lt b \le 39. Since 2a2^a is coprime to 9,9, we have 92a(2ba+1)9 \mid 2^a(2^{b-a} + 1) exactly when 2ba1(mod9).2^{b-a} \equiv -1 \pmod{9}. The powers of 22 modulo 99 cycle through 2,4,8,7,5,12, 4, 8, 7, 5, 1 with period 6,6, so 2d812^d \equiv 8 \equiv -1 exactly when d3(mod6).d \equiv 3 \pmod{6}.

For each difference d=bad = b - a there are 40d40 - d pairs, so the number of multiples of 99 in S\mathcal{S} is d=3,9,,39(40d)=37+31+25+19+13+7+1=133. \begin{aligned} &\sum_{d = 3, 9, \ldots, 39} (40 - d) \\ &= 37 + 31 + 25 \\ &\quad {}+ 19 + 13 + 7 + 1 \\ &= 133. \end{aligned}

The probability is 133780,\frac{133}{780}, and since 133=719133 = 7 \cdot 19 while 780=223513,780 = 2^2 \cdot 3 \cdot 5 \cdot 13, it is in lowest terms. Thus p+q=133+780=913.p + q = 133 + 780 = 913.

← Problem 9#9
Full Exam

Problem 10 in Other Years