Problem: Find the last digit of $3^{1999}$.
My answer is $3$, but the answer sheet says $7$.
Here is what I did:
- $3^{1999}=(3^9)^{222}\cdot3$
- Using Fermat's Little Theorem: $3^9\equiv1\pmod{10}$
- Therefore, $3^{1999}\equiv(3^9)^{222}\cdot3\equiv1^{222}\cdot3\equiv3\pmod{10}$
- Therefore, the last digit should be $3$
Where did I go wrong?