Find the set of values for n such that $x^n \equiv{x}\mod 10$, where $n, x\in\mathbb{N}$.
This question looks like a Fermat's little theorem question but $10$ is not prime. Rather the smallest solution for n is a factor of $10, 5$. Can anyone explain or prove why this is the case? Is $5$ a unique solution for $n$?
(feel free to help put this into proper notation)