Problem 787: (2015 AMC 10b, 23)
Let $n$ be a positive integer greater than 4 such that the decimal representation of $n!$ ends in $k$ zeros and the decimal representation of $(2n)!$ ends in $3k$ zeros. Let $s$ denote the sum of the four least possible values of $n$. What is the sum of the digits of $s$?
$\textbf{(A)}\ 7\qquad\textbf{(B)}\ 8\qquad\textbf{(C)}\ 9\qquad\textbf{(D)}\ 10\qquad\textbf{(E)}\ 11$
- Let $z(m)$ be the number of zeros of $m!$: $z(m)=\lfloor m/5\rfloor+\lfloor m/25\rfloor+\cdots$. We need $z(2n)=3z(n)$.
- For $n<25$, $z(n)=\lfloor n/5\rfloor=k$. Write $n=5k+r$, $0\le r\le4$. Then $\lfloor 2n/5\rfloor=2k+\lfloor 2r/5\rfloor$, and $z(2n)=2k+\lfloor2r/5\rfloor+\lfloor2n/25\rfloor$.
- $k=1$ ($n=5,\dots,9$): $z(2n)=2+\lfloor2r/5\rfloor$, which equals $3$ for $r=3,4$: $n=8,9$. $k=2$ ($n=10,\dots,14$): $z(2n)=4+\lfloor2r/5\rfloor+\lfloor2n/25\rfloor$; $6$ requires $r\ge3$ and $2n\ge25$: $n=13,14$.
- So the four least values are $8,9,13,14$, $s=44$, with digit sum $8$.
- The answer is (B).
Let $n>4$ be a positive integer such that $n!$ ends in $k$ zeros and $(3n)!$ ends in $4k$ zeros. What is the sum of the four least possible values of $n$?