2004 AIME II Problem 10

Below is the professionally curated solution for Problem 10 of the 2004 AIME II, 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 of the real AMC 8, AMC 10, AMC 12, and AIME problems in our complete solution collection are used with official legal permission of the Mathematical Association of America (MAA).

Concepts:number basemodular exponentiationmultiplicative ordercounting pairs

Difficulty rating: 2920

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.

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.\sum_{d = 3, 9, \ldots, 39} (40 - d) = 37 + 31 + 25 + 19 + 13 + 7 + 1 = 133.

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 9Full ExamProblem 11

Problem 10 in Other Years