0

The formula for the exponent of the highest power of prime $p$ dividing $n!$ is $\sum \frac{n}{p^k}$, but the question is $n=1000!$ (really, it has the factorial) and $p=5$.

When I use Wolfram Alpha , I panicked because the number has $2,567$ decimal digits.

I think if I write this number I'd need paper all the way to the Amazon.

Perhaps I misunderstand the formula?

Dan Uznanski
  • 11,025

2 Answers2

0

It’s $n$ in the numerator, not $n!$. It turns out that only the first four terms of the sum are non-zero:

$$\begin{align*} \sum_{k\ge 1}\left\lfloor\frac{1000}{5^k}\right\rfloor&=\left\lfloor\frac{1000}5\right\rfloor+\left\lfloor\frac{1000}{25}\right\rfloor+\left\lfloor\frac{1000}{125}\right\rfloor+\left\lfloor\frac{1000}{625}\right\rfloor+\left\lfloor\frac{1000}{3125}\right\rfloor+\ldots\\ &=200+40+8+1+0+0+0+\ldots\\ &=249\;. \end{align*}$$

Brian M. Scott
  • 616,228
0

Note that $p $is a prime number. look this example : $$6!=6.5.4.3.2.1=2^{1+2+1}.3^{1+1}.5^1\\=2^4.5^1.3^2=\color{red} {10^1}.2^3.3^3\\ \to 10 ^1|6!\\10!=10.9.8.7.6.5.4.3.2.1=5^2.2^8k=\color{red} {(5.2)^2}.2^6k\\ \to 10^2|10!$$ $$n!=2^k.5^m.q\\m<k\\ \to n!=(2.5)^m.\color{red} {2^{k-m}}.5^0.q \\ \to 10^m|n!$$ now it suffice to find power of 5 ,because power of 2 more than power of 5

$$1000!=2^k.5^m.q \\\color{red} {m<k}\\ m=\\ \begin{align*} \sum_{i\ge 1}\left\lfloor\frac{1000}{5^i}\right\rfloor&= \\&\left\lfloor\frac{1000}5\right\rfloor+\left\lfloor\frac{1000}{5^2}\right\rfloor+\left\lfloor\frac{1000}{5^3}\right\rfloor+\left\lfloor\frac{1000}{5^4}\right\rfloor+\left\lfloor\frac{1000}{5^5}\right\rfloor+\ldots\\ &=200+40+8+1+0+0+0+\ldots\\ . \end{align*}$$

Khosrotash
  • 24,922