It’s All About Zero
How many zeroes
occur at the end of the expanded numeral for 1000!?
How about in
general, for n!?
Some Ponderings:
Recall that December’s Problem to Ponder was as follows:
How many zeroes
occur at the end of the expanded numeral for 1000!? How about in
general, for n!?
Zeros at the end
of a number are generated by factors of 10. To obtain a factor of 10, we need a
2 and a 5 as factors. Thus, 5! is the smallest factorial number that will have
a zero at the end: 5! = 5 x 4 x 3 x 2 x 1 = 120. We won’t pick up a second zero
in a factorial until 10!, and 10! = 10 x 9 x …x 5 x 4 x 3 x 2 x 1 = 3628800.
Factors of 2 abound in factorials,
because every other factor is even. So to determine the number of zeros at the
end of the expanded number for a factorial number, we need only to count the
number of factors of 5 in our factorial number.
Students may
jump to the conclusion that all one has to do is to divide a number by 5, and
the integer part of the quotient will yield the number of zeros at the end of
that number factorial. For example, they might conjecture that there are 20
zeros at the end of 100!. However, this strategy misses some of the zeros,
because 100! has factors that have two
factors of 5 in them—for example, 25 = 52, or 50 = 2 x 52.
In fact, the expanded numeral for 100! has 24 zeros at the end. For 1000!, not
only do we need to take into account the factors of 52 but also the
factors of 53, and so forth.
More ponderings
on this problem will appear next month.
December Problem to Ponder—More Ponderings
It’s All about Zero
Recall that December’s Problem to Ponder was as follows:
How many zeroes occur at the end of the expanded numeral for 1000!?
How about in general, for n!?
Last month, we saw that the number of zeros at the end of n! depends on the number factors of 5 that occur in the expansion of n! Powers of 5 will contribute additional factors of 5. For example, 1000! has two hundred factors of 5, forty factors of 52 (25, 50,75, …, 1000), eight factors of 53 (125, 250,375, …, 1000), and one factor of 54 (625). So, in 1000! there are—
200 factors of 5
40 factors of 25
8 factors of 125
+ 1 factor of 625
249 total factors of 5
Thus, 249 zeros occur at the end of the expansion of 1000!
For n!, first find the highest power of 5 that is less than or equal to n. If p is the highest power of 5 so that 5p ≤ n, then the number of zeros at the end of n! will be the sum of
INT(n/5j), j = 1, …, p—that is, the sum of the integer parts of all the quotients of n divided by the powers of 5 that are less than or equal to n.