SOLUTION: Given n!= n(n-1)(n-2)...(1) where n is a natural number greater than one. Find the smallest n so n! ends in at least 50 zeros. Answer: 205

Algebra ->  Permutations -> SOLUTION: Given n!= n(n-1)(n-2)...(1) where n is a natural number greater than one. Find the smallest n so n! ends in at least 50 zeros. Answer: 205      Log On


   



Question 918660: Given n!= n(n-1)(n-2)...(1) where n is a natural number greater than one. Find the smallest n so n! ends in at least 50 zeros. Answer: 205
Answer by Edwin McCravy(20055) About Me  (Show Source):
You can put this solution on YOUR website!
Suppose n is the smallest integer such that n! ends with 50 zeros.

What causes a 0 on the end of a number is a factor of 10.
10 has prime factorization 2*5.  

The factors of n! alternate even numbers and odd numbers.
Among the factors of n! are many more even numbers than
multiples of 5.  Every even number contributes to n! a
factor of 2. 

Therefore the number of zeros on the end of n! is the
same as the number of factors of 5 which n! contains.  That's
because n! cantains more 2 factors than 5 factors, and
thus each 5 factor can be taken with a 2 factor to produce a
10 factor.

For x>0, let [x] represent the largest positive integer which 
does not exceed x. 

The number of multiples of 5 between 1 and n is [n/5]. They 
each contribute 1 multiple of 5 and therefore 1 zero on the 
end of n!  

The number of multiples of 5 between 1 and n^2 is 
[n^2/5].  They each contribute 1 additional multiple of 5 and 
therefore 1 additional zero on the end of n!

The number of multiples of 5 between 1 and n^3 is 
[n^3/5].  They each contribute 1 additional multiple of 5 and 
therefore 1 additional zero on the end of n!

...

The number of multiples of 5 between 1 and n^k is 
[n^k/5].  They each contribute 1 additional multiple of 5 and 
therefore 1 additional zero on the end of n!

Therefore the number of multiples of 5 and therefore the 
number of zeros on the end of n! is 

[n/5]+[n/5^2]+[n/5^3]+···+[n/5^k]+···

Notice that when k becomes large enough such that 5^k is 
greater then n, all the remaining terms will be 0.
Let's try 4 terms of that sequence

[n/5]+[n/5^2]+[n/5^3]+[n/5^4] is not much less, if any, 
than n/5+n/5^2+n/5^3+n/5^4.  So if 4 terms is enough,
we should get a good approximation for n, we set 

n/5 + n/25 + n/125 + n/625 = 50
  
We solve that for n by multiplying through by LCD of 625

125n + 25n + 5n + n = 31250
               156n = 31250 
                  n = 200.3205128

Thus 200 is an approximation for n. We substitute n=200
in

[n/5]+[n/5^2]+[n/5^3]+[n/5^4]

to find the number of factors of 5 in 200!, and the
number of zeros on the end of 200!,

[200/5]+[200/5^2]+[200/5^3]+[200/5^4]

[40]+[8]+[1.6]+[.32] = 40+8+1+0 = 49

That's 1 short of 50. So to get one more 5-factor we only
need to go to the next multiple of 5 above 200, which is
205. And 205 has exactly 1 more 5-factor than 200.

Answer: 205

Edwin