3

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.

Taha Akbari
  • 3,559
  • http://math.stackexchange.com/questions/130352/last-non-zero-digit-of-a-factorial OR http://math.stackexchange.com/questions/941235/how-to-find-the-last-non-zero-digit-of-n – lab bhattacharjee Jul 16 '16 at 08:58
  • @labbhattacharjee The second one doesn't have any nice answer but the first one was helpful. – Taha Akbari Jul 16 '16 at 09:01

2 Answers2

3

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 $.

  • Answer is 3 ( 100! is 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000, calculator used www.careerbless.com/calculators/ScientificCalculator/ ) – Kiran Jul 16 '16 at 10:36
  • @Kiran: Not at all. Please don't downvote when the answer is correct. Read the number you posted again. –  Jul 16 '16 at 10:40
  • 25th digit is 3 only – Kiran Jul 16 '16 at 10:42
  • @Kiran: We are obviously talking about the digit from the right, otherwise the question would be quite meaningless (also, hence the 24 zeros as mentioned in the question). –  Jul 16 '16 at 10:44
  • 1
    Sorry for misinterpreting this. I thought it is from left. – Kiran Jul 16 '16 at 10:44
  • 2
    @M.Fischer Can we find 25th digit from right ?, What if there were 10 zeroes then can we still find the 25 digit from right ? –  Jul 16 '16 at 17:21
  • 2
    @ritwiksinha That's harder. The best way to do so would be to first find out the number of digits (i.e. reduce it to the form $ x = 10^n c $ with $ 0.1 < c < 1 $, and then find the $ n - 25 $ digit (divide $ 10^{n - 25} $ out under modulo 10) –  Jul 17 '16 at 08:27
  • @M.Fischer: how do you see $ x \equiv \dfrac{4^{10} 9^{10} 20!}{5^4}$ easily? – Watson Jul 23 '16 at 18:03
  • 1
    Prime factor $ 100! $ by grouping the divisors together. Let $ 100! = \prod_{n=1}^100 n $, then you can simply "partition" it into smaller products, $ (\prod_{n = 0, 5 \nmid 2n + 1}^{50} 2n + 1) (\prod_{n = 5, 5 | n}^{100} n)(\prod_{n = 1, 5 \nmid n, 2|n}^{100} n) $ (odd, even, products of fives, respectively). –  Jul 24 '16 at 10:30
1

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.$

user317176
  • 11,017