1. Factorial

So here goes my problem. I am not allowed a calculator through this problem...

4! = 4 x 3 x 2 x 1
5! = 5 x 4 x 3 x 2 x 1 etc

How many zeros are there at the end of 50! ?

It would take me hours to do 50! = 50 x 49 x....x 1 by hand so how can I show the number of zeros at the end of 50! ?

All I have done so far is to try and see a pattern but I am stuck... Please help

1! = 1
2! = 2 x 1
3! = 3 x 2 x 1
4! = 4 x 3 x 2 x 1
5! = 5 x 4 x 3 x 2 x 1
6! = 6 x 5 x 4 x 3 x 2 x 1
7! = 7 x 6 x 5 x 4 x 3 x 2 x 1
8! = 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1
9! = 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1
10! = 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1

2. Re: Factorial

An extra zero is added every time you multiply by a number which is a multiple of 5

3. Re: Factorial

So 50! = 50 x 49 x 48 x 47 x 46 x 45 x 44 x 43 x 42 x 41 x 40 x 39 x 38 x 37 x 36 x 35 x 34 x 33 x 32 x 31 x 30 x 29 x 28 x 27 x 26 x 25 x 24 x 23 x 22 x 21 x 20 x 19 x 18 x 17 x 16 x 15 x 14 x 13 x12 x 11 x 10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1

So as there are 10 multiples of 5 in 50! there are 10 zeros at the end of 50!

Is this correct?

4. Re: Factorial

Originally Posted by Natasha1
So here goes my problem. I am not allowed a calculator through this problem...
How many zeros are there at the end of 50! ?[/B]
For a trailing zero (zero at the end) of a product requires a factor of five and a factor two.

$15!$ is a product containing three fives and many twos. So $15!$ as three trailing zeros

$24!$ as four trailing zeros because there four factors of five and many twos.

BUT $25!$ as six trailing zeros because there six factors of five and many twos. Where did the extra five come from?

So what is the answer for $50!$?

Here is a routine to do what you want: $126!$ as thirty-one trailing zeros.
You can 'play with this change 126 to 119 to 121, see what happens.

5. Re: Factorial

Is this correct?

6. Re: Factorial

50! has 10 factors of five and 25 factors of two so it has 10 trailing zeros. Right?

7. Re: Factorial

Originally Posted by Natasha1
Is this correct?
Is what correct? Use that webpage to see about $50!$.
Change the 126 to 50 and enter.

8. Re: Factorial

I am sorry but I do not get that writing. Does that mean there are 12 factors from that link you sent me?

9. Re: Factorial

Originally Posted by Natasha1
I am sorry but I do not get that writing. Does that mean there are 12 factors from that link you sent me?
YES it does mean exactly that.

$50!$ has twelve factors of five $\frac{50}{5}+\frac{50}{25}=10+2=12$.

EVERY PAIR of factors of $\{5,2\}$ gives a zero.

10. Re: Factorial

Originally Posted by Plato
YES it does mean exactly that.

$50!$ has twelve factors of five $\frac{50}{5}+\frac{50}{25}=10+2=12$.

EVERY PAIR of factors of $\{5,2\}$ gives a zero.
Many thanks Plato

11. Re: Factorial

Here is an interesting question, how many trailing zeroes does 1,000,000! have? Can you find a general formula for any non-negative integer?

Spoiler:
$\text{Let}~ \lambda=\text{the number of trailing zeroes,}~n=\text{any non-negative integer}$

$\lambda=\left\lfloor \sum_{k=1}^{k_{max}} \frac{n}{5^k} \right\rfloor \quad \text{where} \quad k_{max}=\left \lfloor \frac{\ln n}{\ln5} \right \rfloor$

12. Re: Factorial

I have a question...

Just one thing... 50! has 10 factors of five right. What does the 50/25 mean exactly in your sum when you say 50/5 + 50/25? That 25 is a factor of 50, right? But isn't it already accounted for in the 10 factors of five?

13. Re: Factorial

Originally Posted by Natasha1
I have a question...

Just one thing... 50! has 10 factors of five right. What does the 50/25 mean exactly in your sum when you say 50/5 + 50/25? That 25 is a factor of 50, right? But isn't it already accounted for in the 10 factors of five?
Here is a list of multiples of five in 50 written in factored form.

$5,\;2 \cdot 5,\;3 \cdot 5,\;4 \cdot 5,\;5 \cdot 5,\;6 \cdot 5,\;7 \cdot 5,\;8 \cdot 5,\;9 \cdot 5,\;2 \cdot 5 \cdot 5$
those are
$5,~10,~15,~20,~25,~30,~35,~40,~45,~50$.

COUNT the number of fives in the first list. There are twelve factors of five.

14. Re: Factorial

Originally Posted by Natasha1
I have a question...

Just one thing... 50! has 10 factors of five right. What does the 50/25 mean exactly in your sum when you say 50/5 + 50/25? That 25 is a factor of 50, right? But isn't it already accounted for in the 10 factors of five?
To find out the number of trailing zeroes upon factorial expansion we need to count how many 5's there are in the product. Let's do a simple example, 16!. In this case you can see that there are three 5's in this product (1.2.3...5...10...15...16), hence you will have 3 trailing zeroes. Let's complicate thing a little bit, what about 47!?

Well, 1...5...10...15...20...25...30...35...40...45.46.4 7, here you have nine 5's + 1 extra from 25. Thus you will have total of 10 trailing zero.

So you can see that for every power of 5, you will have one extra zero (such as 25=5^2, 125=5^3, 625=5^4 ....). Let's do 128!

5.10.15.20.25.30.35.40.45.50.55.60.65.70.75.80.85. 90.95.100.105.110.120.125.126.127.128 =>

5.10.15.20.5.5.30.35.40.45.2.5.5.55.60.65.70.3.5.5.80.85.90.95.4.5.5.105.110.120.5.5.5.126.127.128

In general, you need to n/5 + n/25 + n/125 + n/625 + .... n/(5^kmax).

I hope this help. Let me know if you need more explanation!