Product of Numbers 1-100Date: 02/23/2002 at 21:24:04 From: Katie Subject: Product of numbers 1-100 I was wondering how to find out how many zeros will be at the end of the product of all the numbers from 1 to 100 without multiplying them all out. I know there must be some logical way to figure this out, but I'm stuck. Any and all help would be appreciated. Thank you in advance. :) Katie Date: 02/24/2002 at 01:56:33 From: Doctor Twe Subject: Re: Product of numbers 1-100 Hi Katie - thanks for writing to Dr. Math. Well, each zero at the end of the number means that the number has 10 as a factor. 10, 20, 30, ... have 10 as a factor exactly once; 100, 200, 300, ... have 10 as a factor exactly twice; and so on. Ten's prime factors are 2 and 5. So if we can count how many times 2 and 5 are factors of each of the numbers multiplied to get your product, the lesser of these values (since we need one of each to make a 10) will be the number of zeroes at the end of the number. Counting the number of 2's and 5's isn't that easy, however. Every even number has at least one factor of 2, but many have more than one. Forty, for example, has three factors of 2 (40 = 2*2*2*5). Similarly, every multiple of 5 will have at least one factor of 5, but some will have two. Since 5*5*5 = 125 > 100, we don't have to worry about any having more than two factors of 5. A final thought: it seems pretty clear to me that there will be many more 2's than 5's, and we're only interested in the lesser total, so I'd start by counting the number of 5 factors in the product. You can probably pretty quickly demonstrate that there are at least that many 2 factors as well. I hope this helps. If you have any more questions, write back. - Doctor TWE, The Math Forum http://mathforum.com/dr.math/ Date: 02/25/2002 at 23:42:37 From: Katie Subject: Product of numbers 1-100 First of all, thank you for the help and the tips. I appreciate your quick response. However, I'm not sure I understand what you meant. 100 = 2*2*5*5, right? You said something about the lesser of these values would be the number or zeros at the end of the product of the numbers from 1-100. So then, since there are two 2's and two 5's, would there be two zeros at the end of the number? Maybe I'm thinking too hard about this one, but I'm just confusing myself more as I try to rationalize... please help if you get a chance. Katie Date: 02/26/2002 at 00:51:00 From: Doctor Jubal Subject: Re: Product of numbers 1-100 Hi Katie, Thanks for writing Dr. Math. Here are some hints. The number of zeroes at the end of a number is the number of times that number is divisible by 10. Dividing by 10 is the same as dividing by 2 and 5, so the number of times you can divide by 10 is the lesser of the number of 2's and 5's in a number's prime factorization. Now, since in any long list of consective numbers, there will be more even numbers than numbers divisible by 5, there will be more 2's in their product's prime factorization than 5's, so the "limiting factor" is going to be 5. So what you're really asking is, how many 5's will appear in this number's prime factorization? Does this help? Write back if you'd like to talk about this some more, or if you have any other questions. - Doctor Jubal, The Math Forum http://mathforum.org/dr.math/ Date: 02/26/2002 at 00:51:20 From: Doctor Twe Subject: Re: Product of numbers 1-100 Hi Katie. Thanks for writing back. You have the right idea about the lesser of the two numbers. With two 2's and two 5's, you'd have the minimum of (2,2) = 2 zeroes at the end. If you had 2*2*2*2*2*2*5*5*5, you'd have the minimum of (6,3) = 3 zeroes. Just to verify this, 2*2*2*2*2*2*5*5*5 = 8000, which indeed has 3 zeroes at the end. But the number you want to count is: 1*2*3*4*5*6*7*8* ... *100 So you'd have to break it into its prime factors: (1)*(2)*(3)*(2*2)*(5)*(2*3)*(7)*(2*2*2)* ... *(2*2*5*5) and count all the 2's and 5's in _that_. Fortunately, we can show that there are fewer 5's than 2's (I've listed three 5's and nine 2's in the part I did above, but of course I didn't list the factors 9 to 99), so we only have to count the 5's. I hope this helps. If you have any more questions or comments, write back again. - Doctor TWE, The Math Forum http://mathforum.com/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2015 The Math Forum
http://mathforum.org/dr.math/