Find the number of trailing zeros in the values of 30!
Question
Find the number of trailing zeros in the values of 30!
Solution
To find the number of trailing zeros in the factorial of a number, we need to find the number of pairs of 2 and 5 in its prime factorization, because 2*5 = 10, which contributes a trailing zero.
However, in any factorial, the number of 2s in the prime factorization is always more than the number of 5s. So, we just need to count the number of 5s in the prime factorization of 30!.
-
Divide 30 by 5, you get 6. This is the count of numbers which are multiple of 5 and less than or equal to 30.
-
But numbers like 25, which are multiple of 5^2 = 25, will have two 5s in their prime factorization. So, we also need to count numbers which are multiple of 25 and less than or equal to 30. Divide 30 by 25, you get 1.
-
Add the two counts. 6 + 1 = 7.
So, there are 7 trailing zeros in 30!.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.