AMC 10 · 2006 · #22

Grade 8 number-theory
legendre-formulap-adic-valuationfloor-functionfactorial extreme-principlework-backwards ↑ Prerequisites: legendre-formulafactorial
📏 Long solution 💡 4 insights
Problem
Three positive whole numbers add to 2006, and their factorials are multiplied together. Find the smallest number of zeros the product can end in.

Pick an answer.

(A)
489
(B)
492
(C)
495
(D)
498
(E)
501
How to solve
Strategy Extreme Principle

The question asks for a minimum, so Tool #14 (Extreme Principle) fixes the shape of the whole solution: prove a floor no triple can sink below, then exhibit a triple standing exactly on it. Both halves are mandatory, and dropping the first is the usual way this problem goes wrong. Tool #16 (Change Focus) makes any counting possible: chasing factors of 10 directly is hopeless, but 10 = 2 · 5 and factorials are far richer in twos than in fives, so n is nothing but a count of fives. Tool #7 (Identify Subproblems) counts those fives one power at a time — multiples of 5, then 25, then 125, then 625. Tool #15 (Organize Information in More Ways) is the move that unlocks the optimization: the twelve resulting counts get grouped by denominator instead of by variable, which is the only arrangement in which the constraint a + b + c = 2006 can be applied at all. Tool #4 (Introduce a Variable) names the remainders and proves the single inequality each group obeys; that inequality is the load-bearing claim of the solution, so it is proved from division with remainder rather than read off small cases. Tool #11 (Work Backwards) then runs the equality condition backwards to see what a, b, c must look like for all four groups to be tight simultaneously, and Tool #6 (Guess and Check) confirms the resulting triple by direct computation.

1STEP 1

Count fives, not tens

Only the fives need counting, since they are scarcer.

n = min(v₂(N), v₅(N)) = v₅(N) = v₅(a!) + v₅(b!) + v₅(c!)
2STEP 2

Count the fives inside one factorial

A standard formula counts them inside one factorial.

v₅(k!) = ⌊ k/5 ⌋ + ⌊ k/25 ⌋ + ⌊ k/125 ⌋ + ⌊ k/625 ⌋ (k < 3125)
3STEP 3

Group the twelve terms by denominator

Grouping by denominator lines the terms into four rows.

v₅(a!) + v₅(b!) + v₅(c!) &= ⌊ a/5⌋ + ⌊ b/5⌋ + ⌊ c/5⌋ ; &+ ⌊ a/25⌋ + ⌊ b/25⌋ + ⌊ c/25⌋ ; &+ ⌊ a/125⌋ + ⌊ b/125⌋ + ⌊ c/125⌋ ; &+ ⌊ a/625⌋ + ⌊ b/625⌋ + ⌊ c/625⌋
4STEP 4

One inequality every row obeys

Each row loses at most two to rounding.

⌊ a/k ⌋ + ⌊ b/k ⌋ + ⌊ c/k ⌋ = ⌊ (a+b+c)/k ⌋ - ⌊ (r_a + r_b + r_c)/k ⌋ ≥ ⌊ (a+b+c)/k ⌋ - 2
5STEP 5

Add the four rows for a hard floor

Adding the rows gives a hard floor of 492.

401 + 80 + 16 + 3 = 500 ⟹ n ≥ 500 - 4 · 2 = 492
6STEP 6

Work backwards to a tight triple

Working backwards finds a triple that hits every equality.

a = b = 624 = 5⁴ - 1, c = 2006 - 2 · 624 = 758
7STEP 7

Verify the triple and read off n

Checking it confirms 492, choice (B).

v₅(624!) + v₅(624!) + v₅(758!) = 152 + 152 + 188 = 492 → (B) 492
Answer
492
Two of the five choices die on general grounds, which is a good sign the bound is the right size. Running the remainder argument the other way gives ⌊ a/k ⌋ + ⌊ b/k ⌋ + ⌊ c/k ⌋ ≤ ⌊ 2006/k ⌋, so n ≤ 500 for every triple and choice (E) 501 is impossible outright. Step 5 gives n ≥ 492, so choice (A) 489 is impossible too. The remaining three all sit inside the achievable band 492 ≤ n ≤ 500, so no size argument can decide between them and the construction has to be done. Choice (C) 495 is the trap the problem is built around. Splitting 2006 as evenly as possible gives a = b = 669 and c = 668. Then 133 + 26 + 5 + 1 = 165 for each of 669 and 668 alike, for a total of exactly 495 — the intuitive balanced answer is on the list, and it is beaten by 3. Balancing the numbers is the wrong instinct here; maximizing remainders is the right one. The optimum is also far from unique, which is worth knowing before trusting any single lucky guess. The triple (133, 624, 1249) works as well: v₅(133!) = 26 + 5 + 1 = 32, v₅(624!) = 152, and v₅(1249!) = 249 + 49 + 9 + 1 = 308, totalling 32 + 152 + 308 = 492. Any triple that makes all four rows tight is optimal, and many do — so the value 492 is what is pinned down, not one special split.
💡Key takeaway

Trailing zeros are really a count of fives, and splitting 2006 into three parts can waste at most two fives at each power of five — so prove the waste can never exceed eight, then pick numbers like 624 that waste the maximum at every power at once.

  • Count fives, not tens
  • Count the fives inside one factorial
  • Group the twelve terms by denominator
  • One inequality every row obeys
  • Add the four rows for a hard floor
  • Work backwards to a tight triple
  • Verify the triple and read off n