How many trailing zeros are there in 2 0 2 0 ! ?
Notation: ! denotes the factorial notation .
Bonus: Comment the sum of all the digits in 2 0 2 0 ! .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The number of trailing zeros of n ! is given by z ( n ) = k = 1 ∑ ∞ ⌊ 5 k n ⌋ , where ⌊ ⋅ ⌋ denotes the floor function . For n = 2 0 2 0 , we have:
z ( 2 0 2 0 ) = ⌊ 5 2 0 2 0 ⌋ + ⌊ 2 5 2 0 2 0 ⌋ + ⌊ 1 2 5 2 0 2 0 ⌋ + ⌊ 6 2 5 2 0 2 0 ⌋ = 4 0 4 + 8 0 + 1 6 + 3 = 5 0 3
Bonus: It is obvious that 2 0 2 0 ! is divisible by 9 , hence the sum of all the digits of 2 0 2 0 ! is also divisible by 9 .
Problem Loading...
Note Loading...
Set Loading...
The number of trailing zeros of n ! is given by the largest k such that 1 0 k ∣ n . But since 1 0 = 2 ⋅ 5 , k = m i n ( v 2 ( n ) , v 5 ( n ) ) , where for any prime number p, v p ( n ) = m a x ( k : p k ∣ n ) . Furthermore it is clear that v 2 ( n ! ) ≥ v 5 ( n ! ) for any n , since many more even numbers contribute than multiples of 5. So the answer we are looking for is v 5 ( 2 0 2 0 ! ) . Using Legendre's formula, we have v p ( n ! ) = p − 1 n − s p ( n ) , where s p ( n ) is the sum of the digits of n when expressed in base p . Now write 2 0 2 0 = 3 ⋅ 5 4 + 5 3 + 4 ⋅ 5 = 3 1 0 4 0 5 , so that s 5 ( 2 0 2 0 ) = 8 . Finally, our answer is 5 − 1 2 0 2 0 − 8 = 5 0 3 .