Find the units digit of $572^{42}$ The idea of this exercise is that you use the modulus to get the right answer.
What I did was:
$$572\equiv 2\pmod {10} \\
572^2 \equiv 2^2  \equiv 4\pmod{10} \\
572^3 \equiv 2^3  \equiv 8\pmod{10} \\
572^4 \equiv 2^4  \equiv 6\pmod{10} \\
572^5 \equiv 2^5  \equiv 2\pmod{10} \\
572^6 \equiv 2^6  \equiv 4\pmod{10} \\
(...)$$
I can see that this goes 2,4,8,6 and then repeats. I remember that the gist of the exercise is to find the remainder based on this repetition. How do I do that? I know that $572^{42} \equiv 2^{42}\equiv ? \pmod {10}$. How do I simplify that 42 and answer this using that repetition?

Consider $2^k$ modulo $10$.
You will notice that it enters a repeating pattern: $2,4,8,6,2,4,8,6,2,\dots$
Where $2^k\pmod {10} \equiv \begin{cases}2&\text{when}~k\equiv 1\pmod 4\\ 4&\text{when}~k\equiv 2\pmod 4\\8&\text{when}~k\equiv 3\pmod 4\\6&\text{when}~k\equiv 0\pmod 4\end{cases}$
Now, consider the exponent in this case. It is $42$.  Since the pattern of $2^k$ depends on $k\pmod 4$, we see that $42\equiv2 \pmod 4 $. Therefore, $2^{42}\equiv 4 \pmod {10}$ which implies that ${572}^{42}\equiv 4 \pmod {10}$.
