Skip to main content

2021 Fall AMC 12B Problem 16

Problem 16 of 25IntermediateNumber Theory

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?

Answer choices

Show solution

Solution

The condition is symmetric, so assume abc.a\le b\le c. Then a7,a\le7, and for each fixed aa we have ab23a2a\le b\le\lfloor\frac{23-a}{2}\rfloor and c=23ab.c=23-a-b. The gcd sum can be evaluated as gcd(a,b)+gcd(b,23a)+gcd(a,23b). \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.

More practice

Concepts: greatest common divisor · parity · casework

Problem text and solution from the LIVE past-contest archive. See also the AoPS wiki page for community solutions.