As the question stated, what is the remainder when ${13}^7$ is divided by 9? There are quite a few online questions similar to this. However, I do not really understand the concept of it.
I have attempted this question by looking for a pattern (as suggested in some online search):
${13}^1 / 9$ = 4 remainder
${13}^2 / 9$ = 7 remainder
${13}^3 / 9$ = 1 remainder
${13}^4 / 9$ = 4 remainder
...
There is clearly a pattern of 4, 7, 1 before it repeats itself in the power 4. For power 7, the remainder is therefore 4. I believe the answer to this question is 4 remainder.
My question is how will I approach if the power is much larger than power 7? Say, if we have ${13}^{100}$ divide by 9, is it right to find the remainder using this method:
$100 / 3 = 33.33333 $
Since $33 * 3 = 99$, for the remainder at the 100th power, it will be 4.
Is there a more elegant way of doing this?
Edit:
Actually, this method does not seem to work if the divisible value is larger than 13. Any idea?
The pattern you found is that the answer for $13^n$ depends on what residue you get from dividing $n$ by 3: if it's 1 the answer is 4, if it's 2, the answer is 7, if it's 0 the answer is 1.
Now I avoided using the language of group theory but that's ultimately what you need to learn. What happens here is that for any integers $n$ and $m$, $n$ has finite order modulo $m$, and a classical problem is to find that order. You can learn for example that this order divides $\varphi(m)$ where $\varphi$ is the Euler totient function; this is a direct consequence of Lagrange's theorem in group theory.
In this language what your computations show is that 13 has order 3 modulo 9, and that's why the exponent only matters modulo 3.