Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 4.1.2 (Number of zeros in a row at the right end of $100!$)
Exercise 4.1.2 (Number of zeros in a row at the right end of $100!$)
If were written out in the ordinary decimal notation without the factorial sign, how many zeros would there be in a row at the right end?
Answers
Proof. The number of zeros in a row at the right end of the decimal expansion of is the highest power of dividing . As in Problem 1,
The Legendre-de Polignac’s algorithm gives
Thus . □
Check:
sage: n = factorial(100); n 933262154439441526816992388562667004907159682643816214685929638952175999932299156 08941463976156518286253697920827223758251185210916864000000000000000000000000 sage: counter = 0 sage: while n % 10 == 0: ....: n = n // 10 ....: counter += 1 ....: print(counter) 24