TITLE: The $25$th digit of $100!$
QUESTION [3 upvotes]: I want to find The $25$th digit of $100!$.
My attempt:It is easy to know it has $24$ zeroes.Because:
$\lfloor {\frac{100}{5}} \rfloor+\lfloor {\frac{100}{25}} \rfloor =24$
By getting the fist digits(after deleting all $5$ factors and $24$,$2$ factors)and multiplying them to each other we get the answer $4$ but I want an easier way.

REPLY [3 votes]: Observe the 24 zeros, divide them out, then
$$
x \equiv \frac{4^{10} 9^{10} 20!}{5^4} \equiv 6^2 {4!}^4 \pmod{10}
$$
Obviously $ x \not \equiv \{5, 0\} \pmod {10} $, due to $ 5 \nmid x $. Similarly, it contains factor $ 2 $, so it must be either $ 2, 4, 6, 8 $. At this point, you can simple evaluate it, and you will get $ 4 $.

REPLY [1 votes]: If we exclude the numbers that are divisible by 5, we see a cycle that repeats.
$4! = 24\\
9!/6!\equiv 24 \mod 100$
$100! = \frac {100!}{5^{20} 20!} (5^{20} 20!) = \frac {100!}{5^{20} 20!}\frac {20!}{5^4 4!} (4!)(5^{24})$
$(24^{25})(5^{24}) = (12^{25})(10^{24})(2)$
$12^{25} \equiv 12^5 \mod 100\equiv 32 \mod 100$
The last $2$ non-zero digits of 100! are $64.$
{"set_name": "stack_exchange", "score": 3, "question_id": 1861093}