I'm practicing for my algebra exam but I stumbled on a question I don't know how to solve.
Let $N = 3^{729}$. What is the last digit of $N$?
The example answer says
Since $\gcd(3, 10) = 1$, check that $3^4 = 81 = 1 \pmod {10}$: Now, $729 = 182 \times 4 + 1,$ so we get we get (that might be a typo or missed a step) $3^{729} = 3 \pmod {10}$.
Can anybody help me with this question? Thanks so much!