Hi all,

Is there a general way to find out how many zeros there are at the end of some product like \(50!\) or \(2^{12} \times 5^{10} \times 3^{27}\)?

I know the examples I gave are easy. But for harder problems like the number of zeros at the end of \(2014!\), is there a proper way?

Help would be appreciated. After all, I'm still 13 :P

No vote yet

1 vote

×

Problem Loading...

Note Loading...

Set Loading...

Easy Math Editor

`*italics*`

or`_italics_`

italics`**bold**`

or`__bold__`

boldNote: you must add a full line of space before and after lists for them to show up correctlyparagraph 1

paragraph 2

`[example link](https://brilliant.org)`

`> This is a quote`

Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.`2 \times 3`

`2^{34}`

`a_{i-1}`

`\frac{2}{3}`

`\sqrt{2}`

`\sum_{i=1}^3`

`\sin \theta`

`\boxed{123}`

## Comments

Sort by:

TopNewestTo find the number of zeros at the end of a product, we need to find the minimum of the exponent of 5 and 2, since a number \( abcdef0000 \) is equal to \( abcdef \times 10000 = abcdef \times 10^4 = abcdef = \times 2^4 \times 5^4 \). Note \( abcdef \) can contain a factor of 2 or 5 but not both, or else it would end in 0. So the number of zeros in a number is the minimum of the exponents of 5 and 2.

So in \( 2^{12} \times 5^{10} \times 3^{27} \) the number of trailing zeroes is \( min(12,10) = 10 \).

In products like \( n! \), it is easy to see that the exponent of 5 will be less than the exponent of 2.So we just need to find the exponent of 5. To find the exponent of 5 in \( n! \), you can use Legendre's formula

Log in to reply

Basically, do you mean the magnitude to which the power of 5 is raised?

Log in to reply

Yes.

Log in to reply

For factorials, the general formula for how many zeros there are is practically asking what is the highest power of 5 which divides n!(because the largest power of 2 that divides n! is bigger).The formula is

\(\displaystyle\sum_{i=1}^{\infty}\left \lfloor \frac{n}{5^i}\right \rfloor\). At some point, the \(5^i\) 's will get bigger than n, so the sum is finite.

The reason that the formula works is that you are doing this: first you count the numbers less than or equal to n that are divisible by 5.But then you would have missed the extra powers from the ones that are divisible by 25 etc.

The formula works for any prime p, not just for 5. It is an easy way to figure out the prime factorization of n! without actually calculating it.

For instance, the highest power of 10 that divides 50! is

\(10+2+0+0...=\boxed{12}\)

Log in to reply