Solveeit Logo

Question

Question: Find n such that n! has 12 zeros...

Find n such that n! has 12 zeros

Answer

The values of n such that n! has 12 zeros are 50, 51, 52, 53, 54.

Explanation

Solution

The number of trailing zeros in n! is determined by the number of factors of 5 in its prime factorization. This can be calculated using Legendre's formula: Z(n)=k=1n/5kZ(n) = \sum_{k=1}^{\infty} \lfloor n/5^k \rfloor. We need Z(n)=12Z(n) = 12. Z(n)=n/5+n/25+n/125+Z(n) = \lfloor n/5 \rfloor + \lfloor n/25 \rfloor + \lfloor n/125 \rfloor + \dots Assuming n/125=0\lfloor n/125 \rfloor = 0, we have Z(n)=n/5+n/25=12Z(n) = \lfloor n/5 \rfloor + \lfloor n/25 \rfloor = 12. If n/25=2\lfloor n/25 \rfloor = 2, then 50n<7550 \le n < 75. This implies n/5=10\lfloor n/5 \rfloor = 10, so 50n<5550 \le n < 55. The intersection is 50n<5550 \le n < 55. For n=50,51,52,53,54n = 50, 51, 52, 53, 54, Z(n)=12Z(n) = 12.