AMC 10 Step by Step

2015 AMC 10B Problem 23

P21-25~7 minPrint

Let nn be a positive integer greater than 4 such that the decimal representation of n!n! ends in kk zeros and the decimal representation of (2n)!(2n)! ends in 3k3k zeros. Let ss denote the sum of the four least possible values of nn . What is the sum of the digits of ss ?

Log in to save your progress.
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 10=2⋅510 = 2 \cdot 5. A factorial has many more 22s than 55s, so the number of end zeros equals the number of factors of 55.

For numbers below 5050, count the factors of 55 like this: one for each multiple of 55, plus one more for 2525 (because 25=5⋅525 = 5 \cdot 5). For example, 28!28! contains 5,10,15,20,255, 10, 15, 20, 25, which is 55 multiples, plus the extra 55 from 2525: 66 zeros.

Step 2: why it is hard. Going from n!n! to (2n)!(2n)! roughly doubles the number of multiples of 55. To triple the zeros, (2n)!(2n)! needs something extra. There are two ways to get it: a lucky jump, like 8!8! having only one multiple of 55 while 16!16! has three; or the second 55 inside 2525, which (2n)!(2n)! gets once 2n≥252n \ge 25. Both happen only for small nn, so a table will find the answers quickly.

Step 3: make a table. Start at n=5n = 5 and go up. Write kk for the zeros of n!n!.

nnzeros in n!n! (kk)2n2nzeros in (2n)!(2n)!equals 3k3k?
5,6,75, 6, 71110,12,1410, 12, 1422no
8,98, 91116,1816, 1833yes
10,11,1210, 11, 122220,22,2420, 22, 2444no
13,1413, 142226,2826, 285+1=65 + 1 = 6yes

We checked every nn from 55 up, in order, so the four smallest values are 8,9,13,148, 9, 13, 14.

Step 4: finish. s=8+9+13+14=44s = 8 + 9 + 13 + 14 = 44, and its digits add to 4+4=84 + 4 = 8.

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

Why this works

Zeros at the end of a factorial are only about the prime 55: count the multiples of 55, then add one more for each multiple of 2525, and so on. Doubling nn usually just doubles that count, so tripling it needs an extra, either from how the multiples of 55 happen to fall or from the second 55 in 2525. 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 22 than 55, so the number of trailing zeros of m!m! is the number of factors of 55:
Z(m)=⌊m5⌋+⌊m25⌋+⋯Z(m) = \left\lfloor \frac{m}{5} \right\rfloor + \left\lfloor \frac{m}{25} \right\rfloor + \cdots
We need Z(2n)=3 Z(n)Z(2n) = 3\,Z(n) with n≥5n \ge 5.

Roughly, Z(2n)≈2 Z(n)Z(2n) \approx 2\,Z(n), so tripling needs (2n)!(2n)! to gain extra fives, either from the rounding in ⌊2n/5⌋\lfloor 2n/5 \rfloor or from multiples of 2525 that n!n! lacks. For n<25n < 25, Z(n)=⌊n/5⌋Z(n) = \lfloor n/5 \rfloor, while Z(2n)=⌊2n/5⌋+⌊2n/25⌋Z(2n) = \lfloor 2n/5 \rfloor + \lfloor 2n/25 \rfloor. Tabulate by the block of nn:

  • n=5,6,7n = 5, 6, 7: Z(n)=1Z(n) = 1, Z(2n)=Z(10),Z(12),Z(14)=2Z(2n) = Z(10), Z(12), Z(14) = 2. No.
  • n=8,9n = 8, 9: Z(n)=1Z(n) = 1, Z(16)=Z(18)=3Z(16) = Z(18) = 3. Yes.
  • n=10,11,12n = 10, 11, 12: Z(n)=2Z(n) = 2, Z(20)=Z(22)=Z(24)=4Z(20) = Z(22) = Z(24) = 4. No.
  • n=13,14n = 13, 14: Z(n)=2Z(n) = 2, Z(26)=Z(28)=6Z(26) = Z(28) = 6. Yes.

Four values found: 8,9,13,148, 9, 13, 14, and they are the least since we checked every n≥5n \ge 5 in order. Hence
s=8+9+13+14=44,s = 8 + 9 + 13 + 14 = 44,
whose digit sum is 4+4=84 + 4 = 8.

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

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.