|
||||||||||||
|
||||||||||||
| ||||||||||||
Hi Mukesh, Here is a suggestion. I am not sure if this is exactly what you want, but it might help get you started. First write n! as 2a x 5b x t, where t is divisible by neither 2 nor 5. The exponent of any prime in the prime factorization of n! is known to be the sum from i=1 to infinity of the floor of n/pi, so it is possible to compute a and b. Notice that once pi exceeds n all remaining tems in the sum are zero. Let m be the minimum of a and b. The integer n! ends with a sequence of m zeros. The last non-zero digit of n! is n! modulo 10m+1. The two digits preceding the sequence of m zeros are given by n! modulo 10m+2. There is a small problem though, the leftmost of these two digits could be a zero. In general the K digits preceding the final sequence of m zeros of n! are given n! modulo 10m+K, but there is no reason why some of these cannot be zero (except for the last). I don't know how often there is a zero among them. Papers written by Peter Borwein might be a good place to look for better ideas than these. Victoria | ||||||||||||
|
||||||||||||
Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences. |