Possible Duplicate:
Highest power of a prime $p$ dividing $N!$

How many factors of 10 are there in $100!$ (IIT Question)?

Is it 26,25,24 or any other value

Please tell how you have done it


marked as duplicate by user17762, Amr, Douglas S. Stones, Fabian, Stefan Hansen Jan 12 '13 at 9:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Im getting my ans as 24 is it correct $\endgroup$ – Bharat Khanna Jan 12 '13 at 5:24
  • $\begingroup$ Do you mean how many factors of 10 are there in $100!$? 24 is correct. $\endgroup$ – user18862 Jan 12 '13 at 5:25
  • $\begingroup$ For ex 6 factorial value is 720 so the power 0f 10 is 1 $\endgroup$ – Bharat Khanna Jan 12 '13 at 5:25
  • $\begingroup$ Yes neuro fuzzy thank you $\endgroup$ – Bharat Khanna Jan 12 '13 at 5:26
  • $\begingroup$ Can yout tell how you have done it becoz my method is destructable $\endgroup$ – Bharat Khanna Jan 12 '13 at 5:26

So first, we want to find how many factors of $5$ there are in $100!$. There are $20$ numbers divisible by $5$ from $1$ to $100$, so we start off our count at $20$. Then, we count how many numbers are divisble by $5^2$. There are four: $25, 50, 75, 100$, and so we add four to our count to get $24$ factors of $5$. (Note that we don't add eight fives - if we did so, we would be counting the first factors of five twice!)

Since $5^3>100$, we don't have to worry about third powers of five. There are at least $100/2=50$ factors of $2$ in $100!$, but we're only going to use $24$ of them to get our $24$ multiples of $10$, so we don't have to calculate the exact number of factors of $2$ in $100!$.

So basic method: To find how many factors of $a$ there are in $b!$, first decompose $a$ into its primes $p_n$, and then find out how many factors of each prime $p_n$ are in numbers less than $b$, by using the method I described of checking for divisibility by $p_n$, then $p_n^2$, etc. Then, from this pool of factors, figure out how many you can take. In our examples to make $10^n$ we could take a maximum of $24$ fives and $24$ twos. If we wanted to find how many factors of $40$ (=$2^3 5$) were less than $100$, we would have needed to find out exactly how many factors of $2$ were less than $100$, and then either take $24*3$ twos if there are enough, or less, if there aren't.

See also: youtube Factors of Factorials Part 1


Not the answer you're looking for? Browse other questions tagged or ask your own question.