$N=1!+2\cdot 2!+3\cdot 3!+...+2017\cdot 2017!$ How many consecutive $9$ are there at the end of $N$?
I can't even understand why will there be nines at the end. I think maybe N can be represented as $X\cdot10^n-1$. Appreciate for any hint or clue. I will try to work it out.
We can transform the series into a telescoping sum.
Using the fact that: $k\cdot k!=(k+1)!-k!$
$1+2\cdot 2! +3\cdot 3! +...+2017\cdot 2017! = 2018!-1!$
Now we need to find the number of trailing 0s in 2018! This is the same as finding the largest value of $k$ such that $10^k|2018!$.
$10=2\cdot 5$
$2^{10}=1024$ and $5^4=625$ 2s dominate 5s, so in order to find number of pairs of $(2,5)$ we need to count number of 5s
$k=\lfloor(2018/5) \rfloor +\lfloor(2018/25) \rfloor +\lfloor (2018/125)\rfloor+\lfloor(2018/625)\rfloor=403+80+16+3$
$k=502$