AMC 10 Step by Step

2018 AMC 10B Problem 23

P21-25~7 minPrint

How many ordered pairs (a,b)(a, b) of positive integers satisfy the equation a⋅b+63=20⋅lcm(a,b)+12⋅gcd(a,b),a\cdot b + 63 = 20\cdot \text{lcm}(a, b) + 12\cdot\text{gcd}(a,b), where gcd(a,b)\text{gcd}(a,b) denotes the greatest common divisor of aa and bb , and lcm(a,b)\text{lcm}(a,b) denotes their least common multiple?

Log in to save your progress.
Show solution without answering

Key insight

Write a = gx and b = gy, with g the gcd and x, y sharing no factor. Then 63 equals g times a whole number, so g divides 63.

Solution

An equation with gcd and lcm is easiest after pulling the gcd out of both numbers.

1. Pull out the gcd. Let g=gcd⁡(a,b)g = \gcd(a, b). Then a=gxa = gx and b=gyb = gy, where xx and yy share no common factor (otherwise gg would not be the greatest). For example, a=12a = 12, b=18b = 18 gives g=6g = 6, x=2x = 2, y=3y = 3.
2. Rewrite each piece.
- a⋅b=g2xya \cdot b = g^2 xy.
- lcm(a,b)=gxy\text{lcm}(a, b) = gxy. (In the example, 6×2×3=366 \times 2 \times 3 = 36.)
3. Substitute.
g2xy+63=20gxy+12g.g^2 xy + 63 = 20gxy + 12g.
Move the xyxy terms to one side:
63=20gxy−g2xy+12g=g(xy(20−g)+12).63 = 20gxy - g^2xy + 12g = g\big(xy(20 - g) + 12\big).
4. So gg divides 6363. The right side is gg times a whole number, so gg is one of 1,3,7,9,21,631, 3, 7, 9, 21, 63. Dividing by gg:
63g−12=xy(20−g).\frac{63}{g} - 12 = xy(20 - g).
5. Check each gg. Remember xyxy must be a positive whole number.

ggleft side 63g−12\frac{63}{g} - 12right sideresult
11515119xy19xy5151 is not a multiple of 1919
339917xy17xyno
77−3-313xy13xyright side is positive, no
99−5-511xy11xyno
2121−9-9−xy-xyxy=9xy = 9
6363−11-11−43xy-43xyno

6. Only g=21g = 21 works, with xy=9xy = 9. The ways to write 99 as x×yx \times y are 1×91 \times 9, 9×19 \times 1 and 3×33 \times 3. But 33 and 33 share the factor 33, so that one is out. That leaves (x,y)=(1,9)(x, y) = (1, 9) or (9,1)(9, 1), giving
(a,b)=(21,189) or (189,21).(a, b) = (21, 189) \text{ or } (189, 21).
7. Check. 21×189+63=3969+63=403221 \times 189 + 63 = 3969 + 63 = 4032, and 20×189+12×21=3780+252=403220 \times 189 + 12 \times 21 = 3780 + 252 = 4032.

There are 22 ordered pairs.

The answer is (B) 2\boxed{\textbf{(B)}\ 2}.

Why this works

Writing a=gxa = gx, b=gyb = gy with xx and yy sharing no factor turns gcd and lcm into ordinary multiplication. Then pulling gg out of the equation shows gg must divide a fixed number, so only a handful of cases need checking. Always remember the "no shared factor" rule when you rebuild aa and bb.

Alternative approach

Use the fact that a⋅b=gcd⁡×lcma \cdot b = \gcd \times \text{lcm}. Write GG for the gcd and LL for the lcm. The equation becomes GL+63=20L+12GGL + 63 = 20L + 12G, which rearranges to
(G−20)(L−12)=240−63=177=3×59.(G - 20)(L - 12) = 240 - 63 = 177 = 3 \times 59.
Try the factor pairs. G−20=1G - 20 = 1 and L−12=177L - 12 = 177 give G=21G = 21, L=189L = 189, and 189=21×9189 = 21 \times 9, so it works. G=23G = 23, L=71L = 71 fails because 7171 is not a multiple of 2323. The other pairs make LL smaller than GG or make a value negative. With G=21G = 21 and L=189L = 189, the two numbers are 2121 and 189189 in either order.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Let g=gcd⁡(a,b)g = \gcd(a, b) and write a=gxa = gx, b=gyb = gy with gcd⁡(x,y)=1\gcd(x, y) = 1. Then lcm⁡(a,b)=gxy\operatorname{lcm}(a, b) = gxy and ab=g2xyab = g^2 xy. The equation becomes
g2xy+63=20gxy+12g⟹63=g(20xy+12−gxy)=g(xy(20−g)+12).g^2 xy + 63 = 20 gxy + 12 g \quad\Longrightarrow\quad 63 = g\big(20xy + 12 - gxy\big) = g\big(xy(20 - g) + 12\big).
So gg is a divisor of 6363: g∈{1,3,7,9,21,63}g \in \{1, 3, 7, 9, 21, 63\}, and 63g−12=xy(20−g)\frac{63}{g} - 12 = xy(20 - g).

  • g=1g = 1: 51=19xy51 = 19xy, no.
  • g=3g = 3: 9=17xy9 = 17xy, no.
  • g=7g = 7: −3=13xy-3 = 13xy, no.
  • g=9g = 9: −5=11xy-5 = 11xy, no.
  • g=21g = 21: −9=−xy-9 = -xy, so xy=9xy = 9 with x,yx, y coprime: (x,y)=(1,9)(x, y) = (1, 9) or (9,1)(9, 1).
  • g=63g = 63: −11=−43xy-11 = -43xy, no.

The coprime factorizations of 99 exclude (3,3)(3, 3), leaving two ordered pairs: (a,b)=(21,189)(a, b) = (21, 189) and (189,21)(189, 21). Check: 21⋅189+63=403221 \cdot 189 + 63 = 4032 and 20⋅189+12⋅21=3780+252=403220 \cdot 189 + 12 \cdot 21 = 3780 + 252 = 4032.

The answer is (B) 2\boxed{\textbf{(B)}\ 2}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.