Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Count my zeros please :P!

  1. May 15, 2012 #1
    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. jcsd
  3. May 15, 2012 #2

    Office_Shredder

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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
     
  4. May 15, 2012 #3
    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 :wink: 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.
     
  5. May 15, 2012 #4


    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 [itex]\,\,1962!\,\,[/itex], which is given by [tex]\displaystyle{\sum_{n=1}^\infty\left[\frac{1962}{5^n}\right]}[/tex] with [itex]\,\,[x]=\,\,[/itex] 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 [itex]\,\,488 = 392+78+15+3[/itex]

    DonAntonio
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook