# factorial

• January 3rd 2011, 05:50 AM
vldo
factorial
There are k zeros at the end of 34! = 34 x 33 x  32 x .... 4 x 3 x 2 x 1: What
is the value of k?

I know the answer is 7 zeros but I can't show it with a complete solution. Can anybody help me with this,please...........
• January 3rd 2011, 05:53 AM
alexmahone
Consider the prime factorization of 34!. Since 2's are in abundance, we only need to calculate the number of 5's. 5, 10, 15, 20 and 30 yield one 5 each while 25 yields two 5's. So there are seven 5's in the prime factorization of 34!. Hence there are seven zeros at the end of 34!
• January 7th 2011, 04:15 PM
saravananbs
no. of zeros means no. of tens (10)

to get 10, two factors are required 2 and 5.(10=2X5)

so it is enough to find how many 2's and 5's are there.

1. find no. of 2's

34/2=17
17/2=8
8/2=4
4/2=2
2/2=1

do the successive division and add all quotient, we get no. of 2's =17+8+4+2+1=32.

2. find no. of 5's

34/5=6
6/5=1

no. of 5's =6+1=7

so 34!=(some numbers) X 2^32 X 5^7.

therefore no of zeros or tens is maximum no of combination of 2 &
maximum 7 combination is possible.
• January 7th 2011, 05:04 PM
dwsmith
$\displaystyle k=\sum_{i=1}^{\infty}\left\lfloor\frac{n}{5^i}\rig ht\rfloor=\sum_{i=1}^{\infty}\left\lfloor\frac{34} {5^i}\right\rfloor=\left\lfloor\frac{34}{5}\right\ rfloor+\left\lfloor\frac{34}{5^2}\right\rfloor=7$

At a certain point, the values will all be zero.
• January 8th 2011, 06:36 AM
grgrsanjay
Quote:

Originally Posted by dwsmith
$\displaystyle k=\sum_{i=1}^{\infty}\left\lfloor\frac{n}{5^i}\rig ht\rfloor=\sum_{i=1}^{\infty}\left\lfloor\frac{34} {5^i}\right\rfloor=\left\lfloor\frac{34}{5}\right\ rfloor+\left\lfloor\frac{34}{5^2}\right\rfloor=7$

At a certain point, the values will all be zero.

here [.] indicates greatest integer funtion right??

and is it only applicable for finding prime factors??
• January 8th 2011, 07:42 AM
dwsmith
That notation is the floor and the formula finds the number of trailing zeros.

For instance, let's look at numbers we can easily see 5! = 120 and 10! = 3628800. We have 1 and 2 trailing zeros, respectively.

$\displaystyle k=\sum_{i=1}^{\infty}\left\lfloor\frac{n}{5^i}\rig ht\rfloor=\sum_{i=1}^{\infty}\left\lfloor\frac{5}{ 5^i}\right\rfloor=\left\lfloor\frac{5}{5}\right\rf loor=1$

$\displaystyle k=\sum_{i=1}^{\infty}\left\lfloor\frac{n}{5^i}\rig ht\rfloor=\sum_{i=1}^{\infty}\left\lfloor\frac{10} {5^i}\right\rfloor=\left\lfloor\frac{10}{5}\right\ rfloor=2$