1. ## factorial problem

find thw largest value of n for which 125! is divisible by 6^n

2. Originally Posted by prasum
find thw largest value of n for which 125! is divisible by 6^n
Since there are such a lot of 2s in the prime factorisation of 125! this is equivalent to asking how many 3s are there in the prime factorisation of 125!, and you can just count them.

CB

3. $[\frac{125}{3}]+[\frac{125}{3^2}]+[\frac{125}{3^3}]+[\frac{125}{3^4}]=41+13+4=59$

4. Here is another way.
Look at this site.
Look at the exponent of 3. Why does that work?

5. Originally Posted by Also sprach Zarathustra
$[\frac{125}{3}]+[\frac{125}{3^2}]+[\frac{125}{3^3}]+[\frac{125}{3^4}]=41+13+4=59$
how did you get this

6. Originally Posted by prasum
how did you get this

Legendre Formula:

$\displaystyle{ n!=\displaystyle\Pi_{p\leq n} {p^{\Sigma^{\infty}_{k=1}[\frac{n}{p^k}]}$ when $p$ is prime.

[]-Floor and ceiling functions - Wikipedia, the free encyclopedia

7. Originally Posted by prasum
how did you get this
To expand on Also sprach Zarathustra's post in general if $p$ is prime then the $m$ for which $p^m\| n!$ (this means that $p^m\mid n!$ but $p^{m+1}\nmid n!$) is $\displaystyle \sum_{k=1}^{\infty}\left\lfoor \frac{n}{p^k}\right\rfloor$. To understand why this is try to understand why

$\displaystyle m=\left(\#\text{ of }k\leqslant n!\text{ such that }p\mid k\right)+\left(\#\text{ of }k\leqslant n!\text{ such that }p^2\mid k\right)+\left(\#\text{ of }k\leqslant n!\text{ such that }p^3\mid k\right)+\cdots$

and how this sum describes that number.