Question: With how many zeros does 1999! end?!?
Answer: 496
Proof:  
    The number of zeros at the end of 1999! must correspond to the exact number of times that 10 may be isolated as a factor from the multiplication string of the expanded form of 1999!:

          1999! = S1 = 1× 2 × 3 × 4 × 5 × … × 1998 × 1999

Let us expand S1 a step further so that it resembles a string of clustered prime numbers (in parentheses…hey, that’s recursive!) where each cluster is representative of a number in S1:

          1999! = S1 = 1×  2  ×   3  ×     4     ×  5  × … ×              1998                ×  1999 =
         
                   = S2 = 1× (2) × (3) × (2 × 2) ×
(5) × … × (2 × 3 × 3 × 3 × 3 × 37) × (1999)

In order to deduce the number of times that 10 can be isolated as a factor in the string S1, we need only count the number of pairs of 5 and 2 in the equivalent string of S2, since
10 = 5 × 2.  Before diving into this endeavor, we note with a little forethought that:
   a. since 2 < 5 and
   b. since the numbers in S1 (e.g. 1, 2, 3 etc.) are a multiplication string of consecutive integers,
the number of times that 2 shows up as a factor in the clusters of S2 must be equal to or greater than the number of times that 5 shows up as a factor; a cursory glance at our “condensed” representation of S2 illustrates this fact in that we have three 2’s available to pair with only one 5 within the first few terms of the string.  Hence, we need only concern ourselves with the task of deducing the number of times that 5 appears as factor in the clusters of S2, since we are assured that there exists an ample supply of 2’s available for the pairing.
Initial Step:
     We may begin to approach a solution to our problem by noting the multiples of 5 between 1 and 1999 in S1:
       5 = 5 × 1
     10 = 5 × 2
     15 = 5 × 3
            :
  1990 = 5 × 398
  1995 = 5 × 399

Following the formula for the number
N of integers between two given integers m & n inclusive (i.e. N = m - n + 1), it is apparent that there are 399 multiples of five between 5 (the first multiple of 5 in S1) and 1995 (the last).  This means that there exist 399 numbers in the string of S1 that have 5 as a factor in their representative clusters in S2 at least one time.  If we stop here, we will overlook a multitude of times that 5 shows up as a factor in S2 because we will not take into account the times that 5 shows up more than once within a particular cluster.  Thankfully, there are only a few such cases in which five appears more than once in a representative cluster:
Case 1: Numbers in S1 that are multiples of 25; We may note the multiples of 25 as such:
      25 = (5 × 5) × 1
      50 = (5 × 5) × 2
               :
 
1975 = (5 × 5) × 79

It is apparent that there are 79 multiples of 25 in the string of S1.  We have already accounted for one of the two 5-factors of these numbers present in the representative clusters of S2 by our Initial Step—any multiple of 25 will surely be a multiple of 5 as well.  Thus, we need only account for the later of these two 5-factors, herein noting that we will have effectively isolated 478 of the 5-factors in all of S2’s clusters since 399 + 79 = 478.

Case 2: Numbers in S1 that are multiples of 125
; as before:
     125 = (5 × 5 × 5) × 1
     250 = (5 × 5 × 5) × 2
                   :
   1875 = (5 × 5 × 5) × 15

There are 15 multiples of 125 in S1; in terms of S2, there are 15 clusters that have five as a factor three times over.  We have accounted for the first and second of these three 5-factors by the Initial Step and Case 1—any multiple of 125 is surely a multiple of 5 and 25 as well.  Hence, we proceed to tally up the total number of the third and final of these 5-factors in the above list, viz. 15.  From the clusters of S2, we have effectively isolated 493 5-factors so far: 478 + 15 = 493.

Case 3: Numbers in S1 that are multiples of 625:
    625 = (5 × 5 × 5 × 5) × 1
  1250 = (5 × 5 × 5 × 5) × 2 
  1875 = (5 × 5 × 5 × 5) × 3 
  
So there are 3 numbers in S1 that have a total of four 5-factors in their representative clusters in S2. We erlier accounted for the first three of these by the Initial Step, Case 1, and Case 2 respectively.  We need only tally up the fourth and final of these 5-factors and add them to our previously isolated quantity: 493 + 3 = 496.  Since the next integer that has five as a factor more than four times (viz. 3125) is beyond the domain of our calculation, we may be assured that we have isolated the entire quantity of 5-factors in the clusters of S2, viz. 496.  Since we have an equal or greater number of 2’s to pair with our 5’s, we may safely conclude that we could isolate 10 as a factor of the expanded form of 1999! exactly 496 times; therefore, 1999! must end with 496 zeros.

Quod Erat Demonstrandum
Demonstration by Jacob Heiss; copyright 2001.
Back Home.