Factorial and exponential relationships (Problem)

240 Views Asked by At

I have faced some problems like:

$x,A\in N$

$32!=A*10^x \Rightarrow Max(x)=?\\ 26!=A*3^x \Rightarrow Max(x)=?$

My question will be stated after solving the first one as following:

Since $10=2*5$ and $Max(2,5)= 5$ then $32!$ is divisible by 5.

$32=6*5+2\\6=1*5+1\\1=0*5+1$

Hence $max(x)=6+1+0=7$

My question is How this process work? is there any other method to solve this problem? I am looking forwards to hear from you.

Best Regards.

1

There are 1 best solutions below

1
On BEST ANSWER

In 1808, Legendre showed that the exact power of a prime $p$ dividing $n!$ is :

$\sum \limits_{i=1}^{k} \lfloor \frac{n}{p^i} \rfloor$ where $k$ is the biggest power for $p$ that is less or equal to $n$ $p^k \leq n$ .

So $k = \lfloor \frac{\ln(n)}{\ln(p)} \rfloor$.

Now for the second example : $26! = A*3^x$ => $Max(x)=?$, since $3$ is prime number then we can find the biggest power that divide $26!$ and since $3^3 >26$ so the maximum power is $\lfloor \frac{26}{3} \rfloor + \lfloor \frac{26}{3^2} \rfloor = 8+2 = 10$.