$$7^{101} \mod 5 = 49^{100} \mod 5 = (49^2)^{50} \mod 5$$
What is the next step to find solution?
Regards
$$7^{101} \mod 5 = 49^{100} \mod 5 = (49^2)^{50} \mod 5$$
What is the next step to find solution?
Regards
There is something wrong in your first step, indeed
$$7^{101} \not \equiv 49^{100} \mod 5 \ldots $$
More simply use that
$$7^2 \equiv 49 \equiv -1 \pmod 5$$
therefore
$$7^{101} \equiv 7\cdot7^{100} \equiv 7\cdot (7^{2})^{50} \equiv \,? \pmod 5$$
By Carmichael function if $(a,m)=1$, then $a^{k \lambda (M)}\equiv 1 (mod m)$. That $\lambda (5)=4$. So $7^{4k}\equiv 1 (mod 5)$.
$7^{100}\equiv 1 (mod 5)$ then $7^{101}\equiv 2 (mod 5)$.
What if you do not see a cute way to do this?
There is a more systematic way to do it.
First, $7^x\pmod 5$ is periodic in $x$. Compute a few of them until you see what the pattern is. Then it should be easy to find $7^{101}\pmod 5$.