# How many digits are 9 at the end?

How many digits at the rightmost of this sum are 9?
$$1! + 2\times2! + 3\times3! +\dots +48\times48!$$

I tried to calculate the first few terms but I couldn't solve it. The answer is 10.

HINT: $n\cdot n!=(n+1)n!-n!=(n+1)!-n!$, so

$$\sum_{k=1}^{48}k\cdot k!=\sum_{k=1}^{48}\big((k+1)!-k!\big)\;.$$

Write this out, and you’ll see that most of the terms cancel. In fact, the sum is $49!-1$. Now you need only determine how many zeroes are on the end of $49!$.

• Thank you! I definitely underestimated this question.Now its clear that last 10 terms of 49!-1 are "9". – guest Jul 28 '13 at 21:11
• @guest: You’re welcome! – Brian M. Scott Jul 28 '13 at 21:19