and many more benefits!

Find us on Facebook

GMAT Club Timer Informer

Hi GMATClubber!

Thank you for using the timer!
We noticed you are actually not timing your practice. Click the START button first next time you use the timer.
There are many benefits to timing your practice, including:

Show Tags

Hello, can somebody please explain me how to find out the number of trailing zeros in n!. regards

Fun question! I just want to stress a major point before we dive into this:

This is not the kind of thing you want to memorize in order to do well on the Quant section.

Yes, there is actually a formula here. But two things to remember:

[1)] How often do you see GMAT Quant questions that can be solved by one simple application of a formula? Almost never![2)] Even when there is a simple formula, you'll never be able to memorize your way to a good score!

Instead, we should focus on mastering processes and new ways of thinking that allow us to do well on any problem the GMAT throws our way!

So, I'll discuss this question with all of these points in mind. Just to make sure we're all on the same page, let me pose the question precisely:

Ah ha! We finally got a zero. Let's keep going to see what happens next:

6! = 6*(5!) = 720 ... still just one zero7! = 7*(6!) = 7*720 ...

Ok, let's not forget that we have only two minutes on average for a Quant problem. Could we figure out 7!? Of course! What about 8! ... or 9!? Sure, but this is starting to get a little ridiculous. You should never have to actually compute a factorial larger than 6! on the GMAT. If you're actually working it out, you're doing it the wrong way. Classic example of what I call "Mathematically Correct, but GMAT Incorrect."

So let's step back a moment and think about what is really going on here. With 4!, we had 24 (no zeros), but suddenly with 5! we had 120 (one zero). What happened here to give us that zero?

Let's think more about what it really means to have a zero at the end. Any ideas?

It's a multiple of 10. 4! = 24 is not a multiple of 10, but 5! is. How do we know? Just look at the components:

5*4*3*2*1 = 120

It's the pair of the 5 and the 2 that give us a factor of 5*2 = 10. As we go to higher factorials (6!, 7!, 8!, etc.) we still have that 5 and 2, so any n! with n ≥ 5 will still have that last zero.

Ok, so now we need to think about how we might get a second zero at the end. What do the numbers 700, 1200, 2300, and 127824963400 all have in common? Well, they all end in two zeros, and they are all multiples of ...

100! (Not 100-factorial. I was just excited to say "100" that time!) So what do we need to be a multiple of 100? Well 100 = 10*10 = (2*5)(2*5).

Now it's time to start making some connections. Each zero at the end of n ! is the result of a paired up 2 and 5. What's the first value of n that will give us two zeros at the end of n! ?

It's n = 10 (n = 5 gave us the first 5, so n = 10 is the smallest value of n for which we'll get another factor of 5 in the product that defines n !.) We already have all the 2's we could ever want. The restricting factor here is 5. Now we can extend our observations to a general statement:

The number of zeros at the end of n! is equal to number of factors of 5 in n !

In essence, this is the answer to your question! Now, it's not that practically useful. Let's try a specific example to see what else is going on.

Example. How many zeros are at the end of 75!

Solution. We need to count factors of 5. For starters, we have 75/5 = 15 multiples of 5 that are less than or equal to 75. So, is the answer 15? Not quite, because not all factors of 5 are created equal! Consider 25, which is 25 = 5*5, so we have an extra factor of 5 there. Any others? Consider multiples of 25: 50 = 2*25 (extra factor of 5 there) and 75 = 3*25 (extra factor of 5 there as well). So in total, we have 15 (multiples) + 3 (extras) = 18 factors of 5. Therefore we have 18 zeros at the end of 75!.

In summary, our thought process here has lead to a solid general process:

To determine the number of trailing zeros for n!, find the number of factors of 5 in n!

To determine the number of factors of 5, start by counting the number of multiples of 5.

Finally, consider the number of "extra" factors of 5 we get due to powers of 5 and their multiples.

Hope that helps!

P.S. If you need to be convinced that memorizing a formula is not the way to go here, I'll just mention that what we're really doing here is using a special case De Polignac's Formula applied to the prime 5. Take a look at http://en.wikipedia.org/wiki/De_Polignac%27s_formula if you dare! You might need a Ph.D. in math to really understand this formula, but I guarantee that you don't need a Ph.D. in Math to do well on the GMAT!
_________________

Show Tags

27 Jul 2012, 20:37

Hello all, thank you for your assistance. Mark - I was unable to follow the last example. As 15 is also a multiple of 75 which means it will not result in 10....if you could please help me understand that part. I understood well the explanation in Veritas blog. Really appreciate both of your assistance.regards
_________________

Show Tags

Hello all, thank you for your assistance. Mark - I was unable to follow the last example. As 15 is also a multiple of 75 which means it will not result in 10....if you could please help me understand that part. I understood well the explanation in Veritas blog. Really appreciate both of your assistance.regards

Hi sdas,

15 is the number of multiples of 5 from 1-75. We get that with simple division, 75/5 = 15. However, it is not the number of 5's in 75! That's because 25, 50, and 75 each have TWO fives in their respective prime factorizations--each is a multiple of 5^2. That means that, if me made a gigantic factor tree of 75! (which, of course, we never would!), the number 5 would appear 18 times in the final prime factorization. Thus, there would be 18 trailing 0s at the end.

I hope this clarifies Mark's explanation, which was really great--thanks, Mark!
_________________