2021 AIME II Problem 9

Attempt Problem 9 of the 2021 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 2021 AIME II solutions, or check the answer key.

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

9.

Find the number of ordered pairs (m,n)(m, n) such that mm and nn are positive integers in the set {1,2,,30}\{1, 2, \ldots, 30\} and the greatest common divisor of 2m+12^m + 1 and 2n12^n - 1 is not 1.1.

Answer: 295
Concepts:multiplicative ordergreatest common divisorpower of 2
Difficulty rating: 2920
Solution:

Suppose an odd prime pp divides both 2m+12^m + 1 and 2n1.2^n - 1. From 2m1(modp),2^m \equiv -1 \pmod p, the order of 22 modulo pp divides 2m2m but not m,m, so the order contains exactly one more factor of 22 than mm does. The order also divides n,n, so nn must contain strictly more factors of 22 than m:m: writing v2v_2 for the number of factors of 2,2, we need v2(n)>v2(m).v_2(n) \gt v_2(m).

Conversely, if v2(n)>v2(m),v_2(n) \gt v_2(m), let g=gcd(m,n).g = \gcd(m, n). Then v2(g)=v2(m),v_2(g) = v_2(m), so m/gm/g is odd and 2g+12m+1;2^g + 1 \mid 2^m + 1; also 2gn,2g \mid n, so 2g+122g12n1.2^g + 1 \mid 2^{2g} - 1 \mid 2^n - 1. Hence the gcd exceeds 11 exactly when v2(n)>v2(m).v_2(n) \gt v_2(m).

Among 1,,301, \ldots, 30 the counts of numbers with v2=0,1,2,3,4v_2 = 0, 1, 2, 3, 4 are 15,8,4,2,1.15, 8, 4, 2, 1. The number of pairs with v2(m)<v2(n)v_2(m) \lt v_2(n) is 1515+87+43+21=225+56+12+2=295. \begin{aligned} &15 \cdot 15 + 8 \cdot 7 + 4 \cdot 3 + 2 \cdot 1 \\ &= 225 + 56 + 12 + 2 = 295. \end{aligned}

← Problem 8#8
Full Exam

Problem 9 in Other Years