Fermat's Little Theorem not useful as $p\rightarrow\infty$

181 Views Asked by At

I'm having trouble with some questions of which Fermat's little theorem doesn't seem to simplify enough. For questions such as

What is $10^{41} \text{mod}\;49$? I get stuck. Since $$10^{48}\text{mod}\;49=1\text{mod}\;49$$ $$41=(48-7)$$ therefore the answer is $$10^{-7}\text{mod}\;49$$ But now I have no idea how to simplify this answer down. I know the inverse of $10 \text{mod}\;49$ is $5\text{mod}\;49$. Will I have to calculate $5^7$ with brute force and then take it modulo $49$? Or is there a simpler way to do it? If I have to do it by brute force then this would make fermat's little theorem not very useful as $$a^k \text{mod} \; p, \;p\rightarrow \infty$$ As once you reduce the power so $k<p-1$ then $k$ will still be extremely large.

Thanks