How many zeros...

Hi all,

Is there a general way to find out how many zeros there are at the end of some product like 50!50! or 212×510×3272^{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!2014!, is there a proper way?

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

#HelpMe! #Help #brillianthelp #Pleasehelp #Zero

Note by Victor Loh
7 years, 3 months ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

To 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 abcdef0000 is equal to abcdef×10000=abcdef×104=abcdef=×24×54 abcdef \times 10000 = abcdef \times 10^4 = abcdef = \times 2^4 \times 5^4 . Note abcdef 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 212×510×327 2^{12} \times 5^{10} \times 3^{27} the number of trailing zeroes is min(12,10)=10 min(12,10) = 10 .

In products like n! 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! n! , you can use Legendre's formula

Siddhartha Srivastava - 7 years, 3 months ago

Log in to reply

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

samuel squigi - 7 years, 3 months ago

Log in to reply

Yes.

Siddhartha Srivastava - 7 years, 3 months ago

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

i=1n5i\displaystyle\sum_{i=1}^{\infty}\left \lfloor \frac{n}{5^i}\right \rfloor. At some point, the 5i5^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...=1210+2+0+0...=\boxed{12}

Bogdan Simeonov - 7 years, 3 months ago
×

Problem Loading...

Note Loading...

Set Loading...