Is there a quick way to prime factorize 50!.
I wrote down all the numbers and then factorized, but that takes way too long.
Is there a quick way to prime factorize 50!.
I wrote down all the numbers and then factorized, but that takes way too long.
I would list the primes less than $50$ and count how many times each one appears in $50!$
For example $$47,43,41,37,31,29$$ appears only once. $$23,19,17$$ appears two times each. $$13$$ appears three times. $$11$$ appears four times. $$7$$ appears $8$ times. (49 counts twice ) and so forth.
There is a quick way to do this. The number of times a prime number $n$ divides $k!$ is given by- $$N= {\sum_{i=1}^{\infty}}\left\lfloor{k\over n^i}\right\rfloor$$ For example, the power of $2$ in $20!$ will be $\left\lfloor{20\over 2}\right\rfloor+\left\lfloor{20\over 4}\right\rfloor+\left\lfloor{20\over 8}\right\rfloor+\left\lfloor{20\over 16}\right\rfloor$=10+5+2+1=18.
Hence $2^{18}$ divides $25!$
You would have to do this for all prime numbers till $k!$ though.
NOTE: The formula doesn't work if n isn't prime