0

I have following problem: how many trailing zeros are in 50! I know that there is a method dividing the number by next powers of 5, for example: 50/5 + 50/25 + 50/125 + ... = 10 + 2 + 0 + ... = 12. But my question is there are any other methods? I'm so confused about it.

  • related: http://math.stackexchange.com/questions/141196/highest-power-of-a-prime-p-dividing-n – Blex Jun 30 '15 at 20:06
  • 2
    Hint for the standard method: The trick is that you need to know how many times $10$ divides $50!$. Since $10=5\cdot 2$ and $2$'s are more common than $5$'s, you need to figure out how many times $5$ divides the product $50!$. $50/5$ is the number of multiples of $5$ that occur in the product $50!$. $50/25$ is the number of multiples of $25$ that appear in the product $50!$. These two number count the number of factors of $5$ that appear in $50!$. – Michael Burr Jun 30 '15 at 20:09
  • I encourage you to use a calculator and just count the number of trailing zeroes of $1!, 2!, 3!, 4!, 5!, 6!, 7!, 8!,9!,10!, 11!, 12!, 13!.$ My calculator can show up to $13!$ on its little screen. That should help more than formal proofs. When you go from $4!$ to $5!,$ you add one zero. From $9!$ to $10!,$ you add one zero. However, going from $24!$ to $25!$ you add *two* zeroes. Same going from $49!$ to $50!$ – Will Jagy Jun 30 '15 at 21:05
  • I know this methods a I'm searching another but thanks a lot for help :) – Tomasz Cieśla Jul 02 '15 at 08:07

1 Answers1

0

If we express $n$ in base $5$ as $n=\sum_{k\ge 0}d_k\cdot 5^k,$ then the usual rule can be applied and one can show the number of trailing zeros in $n!$ is given by $$\sum_{k\ge 0}d_k \cdot \frac{5^k-1}{4}.$$ The idea is that in base 5, each time one divides by 5 and takes the floor, the low digit gets dropped. For example (base 5) 231 gives 23 when divided by 5 when integer part is taken, then 23 gives 2 when divided by 5 with integer part taken. Applying the formula above to 231 we have $d_0=1,d_1=3,d_2=2$ and the formul gives $1 \cdot 0 + 3\cdot 1 + 2 \cdot 6=15.$ The base ten version of 231 base 5 being 66, the usual formula would give 66/5=13.2 so 13, then 65/25=2.64 so another 2, for a total of 15 zeros in agreement with the formula above.

The drawback of course is having to convert the given $n$ into base 5 first. :-(

coffeemath
  • 29,884
  • 2
  • 31
  • 52