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 100 ! 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 N of zeros in a row at the right end of the decimal expansion of 100 ! is the highest power of 10 dividing 100 ! . As in Problem 1,

N = min ( ν p ( 2 ) , ν p ( 5 ) ) = ν 5 ( 100 ! ) .

The Legendre-de Polignac’s algorithm gives

100 5 = 20 , 20 5 = 4 , 4 5 = 0 .

Thus N = ν p ( 100 ! ) = 24 . □

Check:

sage: n = factorial(100); n
933262154439441526816992388562667004907159682643816214685929638952175999932299156
08941463976156518286253697920827223758251185210916864000000000000000000000000

sage: counter = 0
sage: while n % 10 == 0:
....:     n = n // 10
....:     counter += 1
....: print(counter)
           24

User profile picture
2024-12-11 09:44
Comments