<s>[INST] Why do remainders show cyclic pattern? Let us find the remainders of $\dfrac{6^n}{7}$,
Remainder of $6^0/7 = 1$
Remainder of $6/7 = 6$
Remainder of $36/7 = 1$
Remainder of $216/7 = 6$
Remainder of $1296/7 = 1$
This pattern of $1,6,1,6...$ keeps on repeating. Why is it so? I'm asking in general, that is for every case of type $a^n/b$'s remainder keeps on repeating as we increase $n$.
P.S: This is a follow up question of my previous question.
 [/INST] Note that as you find more and more powers, you'll eventually run out of remainders. So you'll come back to a previous number, and since exponentiation is repeated multiplication, you'll generate the cycle again. As an example, let's look at powers of $2$ modulo $7$. We have
\begin{align*}
2^1 &\equiv 2 \pmod{7} \\
2^2 &\equiv 2\cdot 2 \equiv 4 \pmod{7} \\
2^3 &\equiv 4 \cdot 2 \equiv 1 \pmod{7} \\
2^4 &\equiv 1 \cdot 2 \equiv 2 \pmod{7} \\
2^5 &\equiv 2 \cdot 2 \equiv 4 \pmod{7} \\
2^6 &\equiv 4 \cdot 2 \equiv 1 \pmod{7} 
\end{align*}
Hopefully, this clarifies how multiplication works in modular arithmetic too.
</s>