I have came across many questions of permutations and combination but I am confused in these types of questions “how to find last two digits" except trailing zeros in $1000!$
where $!$ represents factorial sign
any ideas would be appreciable.
I have came across many questions of permutations and combination but I am confused in these types of questions “how to find last two digits" except trailing zeros in $1000!$
where $!$ represents factorial sign
any ideas would be appreciable.
Here is a brute force way to do it.
Factor $1000!$ as
$2^{998}3^{498}5^{249}...97^{10}$
using primes as bases and the floor-function sum to get the exponents. Divide out $2^{249}5^{249}$ which represents the terminal zeroes, then multiply out the remaining factors modulo $100$. For all primes $p$ except $2$ and $5$, $p^{20}\equiv1 \ mod \ 100$. Have at it!
Note: In base $10$, the rightmost non-zero $1^{st}$ digit of $n!$ is $2, 4, 6,$ or $8$ always.
– Mithlesh Upadhyay Apr 16 '16 at 11:08