rdrdrd1201
Hi
KarishmaB, Would you mind explaining how can we gettot he conclusion that If m! has k zeroes, (m+2)!
will have k+2 zeroes only if (m+1) or (m+2) is a multiple of 25? Starting from 1, a factor of 5 appears in every fifth term. 1, 2, 3, 4,
5, 6, 7, 8, 9,
10, 11, ...
Consider this:
1! = 1
2! = 2
3! = 6
4! = 24
5! = 120
6! = 720
7! = 5040
8! = 40320
9! = 362880
10! = 3628800
...
To make a 10 (i.e. a 0 at the end), you need a 2 and a 5. Till 4!, we have no 5s so we can make no 10s.
The moment we get 5! = 5*4*3*2*1, we get a 5 in the mix. Now 5*2 will combine to give us a 0.
Now the next 4 numbers 6, 7, 8 and 9 when multiplied by the previous terms will not give any extra 0s because they don't have 5 as a factor (we have more than enough 2s). But when we bring in 10 in 10!, we get another 5 and hence another 0.
So 10! ends with two 0s. Then 11!, 12!, 13! and 14! will end with two 0s only because we don't have any new 5s. The moment, we come to 15!, there is another 5 in the mix and now we will have three 0s at the end. From 16! to 19! we will continue having three 0s at the end.
Then 20! will have four 0s at the end and so will 21! to 24!
What happens at 25!? 25 has two 5s so it will bring in two new 0s and 25! will end with six 0s.
This is the logic.
Now, if m! has k zeroes and (m+2)! has k+2 zeroes, it means a multiple of 25 appeared either at (m+1) or at (m+2) which made the two extra 0s.
It is like saying that 23! has four 0s while 25! has six 0s (Here, m = 23 and m+2 is a multiple of 25)
OR 24! has four 0s while 26! has six 0s (Here m = 24 and m+1 is a multiple of 25)
So, considering a multiple of 25, m can take 2 previous values (here they are 24 and 23).
In our question, there are 3 multiples of 25 (that will add two 0s i.e. 100, 150 and 175).
125 will add three 0s so we should ignore it.
So m can take 2 previous values: 98, 99, 148, 149, 173, 174
In all, 6 values.