AMC 10 · 2017 · #19

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, and so on up to 44 next to each other to form one huge 79-digit number N. Find the remainder when N is divided by 45.

Pick an answer.

(A)
1
(B)
4
(C)
9
(D)
18
(E)
44
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

Split 45 into two coprime factors.

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

Remainder when divided by 5

For the 5 side only the last digit matters.

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

Remainder when divided by 9

For the 9 side the digit sum divides exactly.

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

Combine the two clues

Combining the two clues gives 9.

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