# Count my zeros please :P!

1. May 15, 2012

### Kartik.

Question- How many zeros are there in the product of all the natural numbers right from 1 to 1962 or in short in 1962! ?

Attempt-
Well,
The product as a product of prime numbers, will denoted as -
Let the product be N,

N = 2a1 . 3a2 . 5a3 . ....... pax

As far as i see it we will have to count the number of 5s and 2s that occur in the product N's representation above and also the factors which will yield 5s or 2s.So by far we are concerned only to the numbers a1 and a3.And here lies my problem, how will we calculate the number of occurrences and also figure out that how many other factors will yield how many 5s or 2s ?

2. May 15, 2012

### Office_Shredder

Staff Emeritus
You only need to calculate a3, the value of a1 is not needed for the answer (of course you should figure out why)

To figure out what a3 is, it might help to first reason how you could calculate the number of times 5 divides a smaller number like 100! (where you can calculate this by hand) and then see how you would extend the result

3. May 15, 2012

### Infinitum

The number of 2's is obviously greater than the number of 5's, so there's always a 2 for each 5 to give a 10, and that reduces your work by half Now, the total number of 5's in any given number will be equal to the number of times it can be divided by 5. But, there are some terms which have two 5's, meaning they are multiples of 25. Here you need not count the one's you already got due to division by 5. Next would be 5*5*5, that's 125 and so on. Hope this gives you an idea.

4. May 15, 2012

### DonAntonio

As the number of 2's is clearly way larger than that of 5's, all you've to do is calculate what's the highest power of

5 that divides $\,\,1962!\,\,$, which is given by $$\displaystyle{\sum_{n=1}^\infty\left[\frac{1962}{5^n}\right]}$$ with $\,\,[x]=\,\,$ the integer part of the real number x (why is this formula true and why is the above a finite sum?)

BTW, and if you're interested, the number is $\,\,488 = 392+78+15+3$

DonAntonio

Counting in units of $e^1$ Apr 3, 2016