2015 AMC 10B Problem 23
Let be a positive integer greater than 4 such that the decimal representation of ends in zeros and the decimal representation of ends in zeros. Let denote the sum of the four least possible values of . What is the sum of the digits of ?
Show solution without answering
Key insight
End zeros come from factors of 5. Doubling n usually just doubles them, so list small n and find the few that triple: 8, 9, 13, 14.
Solution
Step 1: what makes the zeros? Each zero at the end of a number comes from a factor . A factorial has many more s than s, so the number of end zeros equals the number of factors of .
For numbers below , count the factors of like this: one for each multiple of , plus one more for (because ). For example, contains , which is multiples, plus the extra from : zeros.
Step 2: why it is hard. Going from to roughly doubles the number of multiples of . To triple the zeros, needs something extra. There are two ways to get it: a lucky jump, like having only one multiple of while has three; or the second inside , which gets once . Both happen only for small , so a table will find the answers quickly.
Step 3: make a table. Start at and go up. Write for the zeros of .
| zeros in () | zeros in | equals ? | ||
|---|---|---|---|---|
| no | ||||
| yes | ||||
| no | ||||
| yes |
We checked every from up, in order, so the four smallest values are .
Step 4: finish. , and its digits add to .
The answer is .
Why this works
Zeros at the end of a factorial are only about the prime : count the multiples of , then add one more for each multiple of , and so on. Doubling usually just doubles that count, so tripling it needs an extra, either from how the multiples of happen to fall or from the second in . A short table is quicker than trying to solve this with algebra.
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
Factorials have far more factors of than , so the number of trailing zeros of is the number of factors of :
We need with .
Roughly, , so tripling needs to gain extra fives, either from the rounding in or from multiples of that lacks. For , , while . Tabulate by the block of :
- : , . No.
- : , . Yes.
- : , . No.
- : , . Yes.
Four values found: , and they are the least since we checked every in order. Hence
whose digit sum is .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 1: Integers: The Basics (§1.4, §1.5)
- Introduction to Number Theory, Chapter 2: Primes and Composites
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.2)
- Introduction to Number Theory, Chapter 5: Divisor Problems (§5.2, §5.3)
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.