AMC 10 · 2017 · #23

Grade 6 number-theory
modular-arithmeticdivisibility-rulesdigit-sum chinese-remainder-theoremidentify-subproblems ↑ Prerequisites: modular-arithmetic
📏 Medium solution 💡 2 insights
Problem
Write the numbers 1, 2, 3, ... , 44 next to each other to form one huge 79-digit number N = 123456789101112...4344. Find the remainder when N is divided by 45.

Pick an answer.

(A)
1
(B)
4
(C)
9
(D)
18
(E)
44

AMC 10 2017 problem © Mathematical Association of America (MAA AMC). Reproduced for educational use.

How to solve
Strategy Identify Subproblems

Dividing a 79-digit number by 45 head-on is hopeless. But 45 = 9 x 5, and 9 and 5 have no common factor, so the remainder mod 45 is locked in once we know the remainder mod 9 and the remainder mod 5. Each of those is easy: mod 5 depends only on the last digit, and mod 9 depends only on the digit sum. Find the two small remainders, then test the few possibilities that fit both.

1STEP 1

Split 45 into 9 and 5

Factor 45 = 9 × 5. Since 9 and 5 are coprime, N mod 45 is fixed by N mod 9 and N mod 5 — two easy divisions replace one hard one.

45 = 9 × 5, gcd(9,5)=1
2STEP 2

Remainder when divided by 5

A number's remainder mod 5 comes from its last digit alone. N's last digit is 4, so N leaves remainder 4 mod 5.

N = 10q + 4 ≡ 4 (mod 5)
3STEP 3

Remainder when divided by 9

N's remainder mod 9 equals its digit sum's, since every power of 10 is 1 mod 9. Here 1+2+…+44 = 990 = 9 × 110, so N mod 9 = 0.

1+2+…+44 = (44 · 45)/2 = 990 = 9 × 110 ≡ 0 (mod 9)
4STEP 4

Combine the two clues

We need a multiple of 9 that also leaves remainder 4 mod 5. Among 0, 9, 18, 27, 36, only 9 works, since 9 = 5 + 4. So the answer is (C).

x ≡ 0 (mod 9), x ≡ 4 (mod 5) → x ∈ {0,9,18,27,36}, x=9
Answer
9
The remainder 9 must be less than 45, and it is. Quick sanity check on the two pieces: 9 divided by 5 leaves 4 (matches our mod-5 clue), and 9 is a multiple of 9 (matches our mod-9 clue). Both conditions hold, so 9 is consistent.
💡Key takeaway

To divide a giant number by 45, split 45 into 9 and 5: the last digit handles the 5 and the digit sum handles the 9, then find the one remainder that fits both.

  • Split 45 into 9 and 5
  • Remainder when divided by 5
  • Remainder when divided by 9
  • Combine the two clues