2021 AMC 12B Fall Problem 16

Attempt Problem 16 of the 2021 AMC 12B Fall 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 AMC 12B Fall solutions, or check the answer key.

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

16.

Suppose a,a, b,b, cc are positive integers such that a+b+c=23a + b + c = 23 and gcd⁡(a,b)+gcd⁡(b,c)+gcd⁡(c,a)=9. \begin{aligned} &\gcd(a, b) + \gcd(b, c) \\ &\quad {}+ \gcd(c, a) = 9. \end{aligned} What is the sum of all possible distinct values of a2+b2+c2?a^2 + b^2 + c^2?
259259
438438
516516
625625
687687
Answer: B
Concepts:greatest common divisorparitycasework
Small hint:
By symmetry assume a≤b≤c;a\le b\le c; then a≤7a\le7 and c=23−a−bc=23-a-b
Big hint:
Use gcd⁡(b,c)=gcd⁡(b,23−a)\gcd(b,c)=\gcd(b,23-a) and check the short range a≤b≤23−a2a\le b\le\frac{23-a}{2}
Solution:
The condition is symmetric, so assume a≤b≤c.a\le b\le c. Then a≤7,a\le7, and for each fixed aa we have a≤b≤⌊23−a2⌋a\le b\le\lfloor\frac{23-a}{2}\rfloor and c=23−a−b.c=23-a-b. The gcd sum can be evaluated as gcd⁡(a,b)+gcd⁡(b,23−a)+gcd⁡(a,23−b). \begin{aligned} &\gcd(a,b)+\gcd(b,23-a) \\ &\quad {}+\gcd(a,23-b). \end{aligned}
Checking these short ranges, the possible gcd sums for a=1,2,…,7a=1,2,\ldots,7 are, respectively, {3,4,13},\{3,4,13\}, {4,6,10},\{4,6,10\}, {3,5,6,8,9,12},\{3,5,6,8,9,12\}, {4,6},\{4,6\}, {3,7,8,11},\{3,7,8,11\}, {4,6,8},\{4,6,8\}, and {9,10}.\{9,10\}. The value 99 occurs only at (a,b,c)=(3,5,15)(a,b,c)=(3,5,15) and (7,7,9).(7,7,9).
The triple (7,7,9)(7, 7, 9) has gcd⁡\gcd sum 7+1+1=97 + 1 + 1 = 9 and a2+b2+c2=49+49+81a^2 + b^2 + c^2 = 49 + 49 + 81 =179.= 179. The triple (3,5,15)(3, 5, 15) has gcd⁡\gcd sum 1+5+3=91 + 5 + 3 = 9 and a2+b2+c2=9+25a^2 + b^2 + c^2 = 9 + 25 +225=259.+ 225 = 259.
The sum of the distinct values is 179+259=438.179 + 259 = 438.
Thus, the correct answer is B.
LIVE by Po-Shen Loh
Programs

LIVE Classes

Self-Paced Classes

Stars

Scholarship

About Us

Who Is Po-Shen Loh?

Email Contact

Newsletter

Jobs

Become a Star

For a more Thought Full world.

© 2026 Expii, Inc.