1

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.

ashi
  • 165
  • Do you mean to say that you can answer "trailing zeros in $1000!$", but other problems are more difficult? Could you give one or two specific examples of a problem that confuses you? – David K Apr 16 '16 at 10:52
  • I didn't get you! – ashi Apr 16 '16 at 11:03
  • @ashi, Question: In base $10$, the rightmost non-zero $1^{st}$, $2^{nd}$ and $3^{rd}$ digit of $n!$.

    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
  • @ashi I do not understand your question. I am trying to find out what it is. That is what my previous comment was about. – David K Apr 16 '16 at 11:17

1 Answers1

0

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!

Ski Mask
  • 1,910
Oscar Lanzi
  • 39,403