Find the number of trailing zeroes.

812 Views Asked by At

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.

2

There are 2 best solutions below

7
On BEST ANSWER

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.

0
On

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}]$$