last non-zero digit of factorial
We will show how to compute the last non-zerodigit of the factorial of a number from itsdigits without having to compute the factorial itself.
Let denote the last non-zero digit of in base 10.We note some basic properties of which can easilybe checked:
- •
For all , we have .
- •
If and , then .
We also tabulate the values of for small values of :
Next, we make two less trivial observations:
For all positive integers , we have .