Last non-zero digit of a factorial

How many different positive integers n n less than 2019 2019 are there such that the last non-zero digit of n ! n! is equal to 5 5 ?

0 3 5 27

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Robert Szafarczyk
Jan 23, 2019

The last non zero digit is equal to 5 5 if and only if more 5 5 's go into n ! n! than 2 2 's. In other words v 5 ( n ! ) > v 2 ( n ! ) v_{5}(n!) > v_{2}(n!) which is impossible.

Jordan Cahn
Jan 23, 2019

Lemma: For any n > 1 n>1 , 2 2 appears more often than 5 5 in the prime factorization of n ! n! .
Proof: A prime number p p appears precisely n p + n p 2 + \left\lfloor\frac{n}{p}\right\rfloor + \left\lfloor\frac{n}{p^2}\right\rfloor + \cdots times in the prime factorization of n ! n! . Since n 2 k n 5 k \left\lfloor \frac{n}{2^k} \right\rfloor \geq \left\lfloor \frac{n}{5^k} \right\rfloor for any k k , 2 2 appears at least as often as 5 5 as a prime factor. Furthermore, since n 2 > n 5 \left\lfloor \frac{n}{2} \right\rfloor > \left\lfloor \frac{n}{5} \right\rfloor (for n > 1 n>1 ), 2 2 must occur strictly more often than 5 5 .

Assume that the last non-zero digit of n ! n! is 5 5 . Let n ! n! have k k trailing zeros. Then the last digit of n ! 1 0 k \frac{n!}{10^k} is a 5 5 , implying that n ! 1 0 k = n ! 2 k 5 k \frac{n!}{10^k} = \frac{n!}{2^k5^k} is odd and divisible by 5 5 . Thus 2 2 appears precisely k k times in the prime factorization of n n , but 5 5 appears more than k k times, a contradiction.

Thus, 0 \boxed{0} such n n exist.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...