For how many integers , with , is it possible to find a value of so that ends with exactly zeros?
Solution
If ends with exactly zeroes, then is divisibe by but not divisible by . In this case, we can write where is not divisible by 10. Since , when , the product includes more multiples of 2 than of 5 among the integers in its product, so includes more factors of 2 than of 5. This in turn means that, if ends in exactly zeroes, then where is not divisible by 5, and so the number of zeroes at the end of is exactly equal to the number of prime factors of 5 in the prime factorization of . We note also that as increases, the number of zeroes at the end of never decreases since the number of factors of 5 either stays the same or increases as increases. For to , the product includes 0 multiples of 5, so ends in 0 zeroes. For to , the product includes 1 multiple of 5 (namely 5), so ends in 1 zero. For to , the product includes 2 multiples of 5 (namely 5 and 10), so ends in 2 zeroes. For to , the product includes 3 multiples of 5 (namely 5,10 and 15), so ends in 3 zeroes. For to , the product includes 4 multiples of 5 (namely , and 20), so ends in 4 zeroes. For to , the product includes 5 multiples of 5 (namely , and 25) and includes 6 factors of 5 (since 25 contributes 2 factors of 5), so ends in 6 zeroes. For to ends in 7 zeroes. For to ends in 8 zeroes. For to ends in 9 zeroes. For to ends in 10 zeroes. For to ends in 12 zeroes, since the product includes 10 multiples of 5, two of which include 2 factors of 5. For to will end in zeroes as increases. For to ends in 18 zeroes. For to ends of zeroes as increases. For to ends in 24 zeroes. For to ends in zeroes. For ends in 31 zeroes since 125 includes 3 factors of 5, so 125! ends in 3 more than zeroes than 124!. Of the integers with , there is no value of for which ends in zeroes when , which means that of the values of are possible.