# Find the number of trailing zeroes. [duplicate]

Find the number of trailing zeroes.

$k=1^1\times 2^2\times 3^3\times \cdots \times100^{100}$

It usually involves calculating number of $5$'s in

$5^5\times 10^{10}\times 15^{15}\times \cdots\times 100^{100}$

calulating 5's one by one is pretty boring and time consuming are their any other methods.

• Very similar to this – AvZ Mar 1 '15 at 8:24
• @avz thnks for the link – R K Mar 1 '15 at 8:40

I was recently working on this.

$k=1^1\times 2^2\times 3^3\times \cdots \times100^{100} = $$\frac{(100!)^{100}}{1!\cdot2!\cdot3!....\cdot99!}$$$

Now calculate trailing zeroes in the factorials... using the de Poliganc's formula (No need to count fives): Derive a formula to find the number of trailing zeroes in $n!$

Use the formulae there & then customize it according to tailor it to this problem to solve it.

Edit: Alternative is:- Number of fives in the expression involves counting number of fives from all the multiples of five.

Easiest trick=> $5^5\times 10^{10}\times 15^{15}\times \cdots\times 100^{100}$

Number of fives = Sum of all the terms of the powers of the above expression! Therefore, sum would be $5+10+15....+100$ This is easily solvable using arithmetic progression sum formula.

$100 = 5 +(n-1)5$ => $n = 20$

Sum = $\frac{n(2a+(n-1)d)}{2}=\frac{20(2*5+(20-1)5)}{2}= 1050$

$25^{25}=5^{50},\\ 50^{50}=5^{100}\cdot2^{50}\\ 75^{75}=5^{150}\cdot3^{75}\\ 100^{100}=5^{200}\cdot4^{100}\\$

Therefore number of zeroes, will be $1050+\frac{50+100+150+200}{2} = 1300$ Zeroes.

• do i have to calculate no of zero's in $1!\cdot2!\cdot3!....\cdot99!$ one by one ? – R K Mar 1 '15 at 8:06
• You can brute solve it using a computer. Otherwise, calculating the number of trailing zeroes in a factorial is easier than doing so for a square. (Use a computational engine online for quickly getting the output of number of zeroes after having inputted the formula.) Unfortunately, I still think it's a bit inefficient....But certainly easier than the problem we started out with! If your looking for a magically fast answer, best bet is to do some computer coding. – Kugelblitz Mar 1 '15 at 8:11
• this is a pen and paper question, calculators not allowed. – R K Mar 1 '15 at 8:12
• Then you can do another thing, which you can see after I update my post. Wait for two minutes.. – Kugelblitz Mar 1 '15 at 8:13
• Thanks very nice , but you have to bit carefull as $25^{25}=5^{50},\\ 50^{50}=5^{100}\cdot2^{50}\\ 75^{75}=5^{150}\cdot3^{75}\\ 100^{100}=5^{200}\cdot4^{100}\\$ so total number of zero's =$1050+\frac{50+100+150+200}{2}=1300$ – R K Mar 1 '15 at 8:38

Above expression is same as $$\frac{(100!)^{100}}{1!\cdot2!\cdot3!....\cdot99!}$$ calculate trailing zeroes in $100!$ raise it by 100 calculate number of trailing zeroes for other factorials too,a pattern can be observed. Number of trailing zeroes in n! is given by, $$\sum_{i=1}^{\infty}[\frac {n}{5^i}]$$