# Factorial's last digit [closed]

Let $a_n$ denote last nonzero digit of the factorial $n!$. Is the sequence $a_n$ eventually periodic, that is:

$$(\exists n \exists k \forall m > n )(a_{m+k} = a_m)?$$

The conjecture comes from the fact that $n! = (n-1)! \cdot n$ and similar recurrence relation may be true for $a_n$, because reduction modulo $10$ is a homomorphism of rings $\mathbb Z \to \mathbb Z / 10$. The more I think about this the less likely to true it seems, as multiplication by $5$ turns any (last) even digit into zero.

## closed as off-topic by Namaste, Xam, Siong Thye Goh, Dando18, HenrikAug 11 '17 at 22:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Namaste, Xam, Siong Thye Goh, Dando18, Henrik
If this question can be reworded to fit the rules in the help center, please edit the question.

• Out of curiosity, what led you to believe that it would be? (What initial work did you do?) – mdave16 Aug 11 '17 at 21:48
• – Gerry Myerson Aug 12 '17 at 5:59

• thinking out loud if $\mod_{10} {(m+k)!} = m!\prod_{i=1}^{k}{\left(m+i\right)}$ and if (I should check this before posting) $\mod{ab} = \left(\mod{a}\right) \left(\mod{b}\right)$ then $\mod_{10}{\left(\prod_{i=1}^{k}{\left(m+i\right)}\right)} = 1$ always? my apologies if my modulo arithmetic is seriously flawed – phdmba7of12 Aug 11 '17 at 22:26