This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The number of trailing zeroes in any number is the same as the exponent of the largest power of 1 0 that divides the number; this in turn means that the number of trailing zeroes in any number is the same as the exponent of the either the largest power of 2 or the largest power of 5 (whichever is lower) that divides the number.
For n ≥ 2 , n ! has a larger of number of multiples of 2 than multiples of 5 , which means that the number of trailing zeroes in n ! is the same as the exponent of the largest power of 5 which divides n ! . We can calculate this power using the formula
⌊ 5 n ⌋ + ⌊ 5 2 n ⌋ + ⌊ 5 3 n ⌋ + . . . .
In our case we find that the largest power of 5 which divides 2 5 8 ! is
⌊ 5 2 5 8 ⌋ + ⌊ 5 2 2 5 8 ⌋ + ⌊ 5 3 2 5 8 ⌋ = 5 1 + 1 0 + 2 = 6 3
so 2 5 8 ! has 6 3 trailing zeroes. So the digit we're seeking is the first non-zero digit to the left of the trailing zeroes.
Consider the product of four consecutive natural numbers between multiples of 5 . These could either be of the form ( 1 0 k + 1 ) ( 1 0 k + 2 ) ( 1 0 k + 3 ) ( 1 0 k + 4 ) or ( 1 0 k + 6 ) ( 1 0 k + 7 ) ( 1 0 k + 8 ) ( 1 0 k + 9 ) . Then
( 1 0 k + 1 ) ( 1 0 k + 2 ) ( 1 0 k + 3 ) ( 1 0 k + 4 ) ≡ 1 ⋅ 2 ⋅ 3 ⋅ 4 ( m o d 1 0 ) ≡ 2 4 ( m o d 1 0 ) ≡ 4 ( m o d 1 0 )
and similarly
( 1 0 k + 6 ) ( 1 0 k + 7 ) ( 1 0 k + 8 ) ( 1 0 k + 9 ) ≡ 6 ⋅ 7 ⋅ 8 ⋅ 9 ( m o d 1 0 ) ≡ - 4 ⋅ - 3 ⋅ - 2 ⋅ - 1 ( m o d 1 0 ) ≡ 2 4 ( m o d 1 0 ) ≡ 4 ( m o d 1 0 )
Any number congruent to 4 m o d 1 0 can be written as 2 m , where m is congruent to either 2 m o d 1 0 or 7 m o d 1 0 ; however, our products above contain exactly two even factors so if we were to factor out a single 2 the remaining factor would have to be congruent to 2 m o d 1 0 .
Thus any product of five consecutive natural numbers ending in a multiple of 5 can be written as
( 1 0 k + 1 ) ( 1 0 k + 2 ) ( 1 0 k + 3 ) ( 1 0 k + 4 ) ( 1 0 k + 5 ) = ( 1 0 k + 5 ) ⋅ 2 ⋅ a
or
( 1 0 k + 6 ) ( 1 0 k + 7 ) ( 1 0 k + 8 ) ( 1 0 k + 9 ) ( 1 0 k + 1 0 ) = ( 1 0 k + 1 0 ) ⋅ 2 ⋅ b
where a and b are both congruent to 2 m o d 1 0 .
Now 2 5 8 ! can be split into 5 1 blocks of five consecutive natural numbers, with three remaining factors:
2 5 8 ! = ( 1 ⋅ 2 ⋅ 3 ⋅ 4 ⋅ 5 ) ⋅ ( 6 ⋅ 7 ⋅ 8 ⋅ 9 ⋅ 1 0 ) ⋅ ( 1 1 ⋅ 1 2 ⋅ 1 3 ⋅ 1 4 ⋅ 1 5 ) ⋅ ( 1 6 ⋅ 1 7 ⋅ 1 8 ⋅ 1 9 ⋅ 2 0 ) ⋅ . . . . ⋅ 2 5 6 ⋅ 2 5 7 ⋅ 2 5 8 = ( 5 ⋅ 2 ⋅ a ) ⋅ ( 1 0 ⋅ 2 ⋅ b ) ⋅ ( 1 5 ⋅ 2 ⋅ c ) ⋅ ( 2 0 ⋅ 2 ⋅ d ) ⋅ . . . . ⋅ 2 5 6 ⋅ 2 5 7 ⋅ 2 5 8 = ( 5 ⋅ 1 0 ⋅ 1 5 ⋅ 2 0 ⋅ . . . . ) ⋅ ( 2 ⋅ 2 ⋅ 2 ⋅ 2 ⋅ . . . . ) ⋅ ( a ⋅ b ⋅ c ⋅ d ⋅ . . . . ) ⋅ 2 5 6 ⋅ 2 5 7 ⋅ 2 5 8 = 5 5 1 ⋅ ( 1 ⋅ 2 ⋅ 3 ⋅ 4 ⋅ . . . . ) ⋅ 2 5 1 ⋅ ( a ⋅ b ⋅ c ⋅ d ⋅ . . . . ) ⋅ 2 5 6 ⋅ 2 5 7 ⋅ 2 5 8 = 1 0 5 1 ⋅ 5 1 ! ⋅ ( a ⋅ b ⋅ c ⋅ d ⋅ . . . . ) ⋅ 2 5 6 ⋅ 2 5 7 ⋅ 2 5 8
We know that the factor ( a ⋅ b ⋅ c ⋅ d ⋅ . . . . ) above will be congruent to 2 5 1 m o d 1 0 and we can calculate that 2 5 6 ⋅ 2 5 7 ⋅ 2 5 8 ≡ 6 ⋅ 7 ⋅ 8 ≡ 3 3 6 ≡ 6 m o d 1 0 .
Thus we can write
1 0 5 1 2 5 8 ! ≡ ( 5 1 ! ⋅ 2 5 1 ⋅ 6 ) ( m o d 1 0 )
If we repeat the above process for 5 1 ! , we get that
1 0 1 0 5 1 ! ≡ ( 1 0 ! ⋅ 2 1 0 ⋅ 1 ) ( m o d 1 0 )
and
1 0 2 1 0 ! ≡ ( 2 ! ⋅ 2 2 ) ( m o d 1 0 )
Combining these we find that
1 0 6 3 2 5 8 ! ≡ ( 2 ! ⋅ 2 2 ⋅ 2 1 0 ⋅ 2 5 1 ⋅ 6 ) ( m o d 1 0 ) ≡ ( 2 6 4 ⋅ 6 ) ( m o d 1 0 )
Finally, using the facts that 2 4 ≡ 6 m o d 1 0 and 6 n ≡ 6 m o d 1 0 we get
1 0 6 3 2 5 8 ! ≡ ( ( 2 4 ) 1 6 ⋅ 6 ) ( m o d 1 0 ) ≡ 6 1 7 ( m o d 1 0 ) ≡ 6 ( m o d 1 0 )
so 2 5 8 ! will have 6 3 trailing zeroes, and the 6 4 th digit will be 6