Brain Teasers
1000!
How many trailing zeros are in the number 1000!?
Answer
The ! stands for factorial. So, there are exactly 249 trailing zeros in 1000!The only way to get a trailing zero is by multiplying a factor of 1000! which is 2 by a factor of 1000! which is 5. The modified problem is thus: How many such pairs of factors are there?
There are 500 = 1000/2 numbers between 1 and 1000 (inclusive) which are even, so there are at least 500 factors of 2 in 1000!. There are 200 = 1000/5 numbers which are multiples of 5. But in addition there are 40 = 1000/25 numbers which are multiples of 25, each of which gives one factor of five in addition to the one counted in the 200 and the one counted in the 40 above. Finally there is 1 = [1000/625] number which is a multiple of 625, this gives one further factor of 5. Thus there are exactly 200 + 40 + 8 + 1 = 249 factors of 5 in 1000! and since there are more than sufficient factors of 2, there are exactly 249 trailing zeros in 1000!
Hide Answer Show Answer
What Next?
View a Similar Brain Teaser...
If you become a registered user you can vote on this brain teaser, keep track of which ones you have seen, and even make your own.
Solve a Puzzle
Comments
I have no idea of anything you just wrote.............
the question was not how many zeroes were in 1000!, but how many zeroes were at the end of 1000! In fact there are no zeroes at the end of 1000!
Nice. But you never do explain where you got the group of 8 factors from. I presume that is refers to the 8 cases of factors of 125 or 5^3.
Your solution may have been clearer if you explained that 25 is 5^2, so when it is multiplied by certain even numbers (an even number which is itself the product of of 2 even numbers, like 44 or 8, but not 2 or 6 or 1the product will end in 2 zeros. Thus all numbers which have factors of 25 may contribute 2 zeros to the end of the factorial. A similar arguement can be made for 125 (5^3) where there will be 3 zeros (if multiplied by an even number that is itself the product of three even numbers like 8 or 32 but not 4 or 14). A similar argument can be made for 625 or 5^4 where there will be 4 zeros contributed (if multiplied by even numbers that ae themselves the product of 4 even numbers like 16 or 48 or 12.
However, a fine teaser!
Your solution may have been clearer if you explained that 25 is 5^2, so when it is multiplied by certain even numbers (an even number which is itself the product of of 2 even numbers, like 44 or 8, but not 2 or 6 or 1the product will end in 2 zeros. Thus all numbers which have factors of 25 may contribute 2 zeros to the end of the factorial. A similar arguement can be made for 125 (5^3) where there will be 3 zeros (if multiplied by an even number that is itself the product of three even numbers like 8 or 32 but not 4 or 14). A similar argument can be made for 625 or 5^4 where there will be 4 zeros contributed (if multiplied by even numbers that ae themselves the product of 4 even numbers like 16 or 48 or 12.
However, a fine teaser!
The answer is misexplained in the use of the word "factor" and the lack of the word "multiple". To try and simplify it, every zero in the long expression of 1000! is the result of multiplying a 2 with a 5. Thus, if we count the occurances of 2 as a factor and also the occurences of 5 as a factor, whichever there are less of (2's or 5's) will be the number of times a zero is produced in the result. So we count all numbers which are MULTIPLES of 2, and then the multiples of 5. Since numbers that are multiples of 25 introduce two 5's, we count them twice. 625 has three 5's in it's prime factorization, thus is counted thrice. Quite a good job with this teaser, though you painted yourself into a corner of sorts with having to construct a workable explanation.
I don't think the answer to this teaser is correct, I think there are a lot more than 249 zeros in 1000!
I will use your logic with a more workable number, let's say 15! There are 3 instances of 5 being a factor in the numbers between 1 and 15. There are 10 instances of 2 being a factor (7+3). By your logic, 3
I will use your logic with a more workable number, let's say 15! There are 3 instances of 5 being a factor in the numbers between 1 and 15. There are 10 instances of 2 being a factor (7+3). By your logic, 3
I don't think the answer to this teaser is correct, I think there are a lot more than 249 zeros in 1000!
I will use your logic with a more workable number, let's say 15! There are 3 instances of 5 being a factor in the numbers between 1 and 15. There are 10 instances of 2 being a factor (7+3). By your logic, 3 is less than 10 so there should be 3 zeros in 15!, however 15! = 1,307,674,368,000... four zeros.
The extra zero comes from 7*15 = 105. There will be many more examples of this in 1000!
(P.S. apologies for the double post, I used a less than symbol and I think it got treated like I was trying to post HTML)
I will use your logic with a more workable number, let's say 15! There are 3 instances of 5 being a factor in the numbers between 1 and 15. There are 10 instances of 2 being a factor (7+3). By your logic, 3 is less than 10 so there should be 3 zeros in 15!, however 15! = 1,307,674,368,000... four zeros.
The extra zero comes from 7*15 = 105. There will be many more examples of this in 1000!
(P.S. apologies for the double post, I used a less than symbol and I think it got treated like I was trying to post HTML)
........what???????
....i don't get it...
....i don't get it...
TRAILING zeros, leftclick.
Nice teaser. I got the answer the same way.
Nice teaser. I got the answer the same way.
To post a comment, please create an account and sign in.
Follow Braingle!