I'm taking my first steps into modular arithmetic and I'm already stuck.
Calculate:
$$177^{20^{100500}}\pmod{60}$$
I don't know how to tackle this one. So far I've been applying Euler's Theorem and Fermat Little Theorem to compute more simple expressions, but here we notice that $\mathrm{gdc}(177,60) = 3 \neq 1$ so, to my understanding, I can't apply any of the two theorems. I tried the following instead:
\begin{align} 177^{20^{100500}} \pmod{60} &\equiv (3\cdot 59)^{20^{100500}}\bmod 60\\ &\equiv (3 \bmod 60)^{20^{100500}} \cdot (59\bmod60)^{20^{100500}}\\ &\equiv (3 \bmod 60)^{20^{100500}} \cdot (-1)^{20^{100500}} \end{align}
Since $20^{n}$ is even $\forall n \in \mathbb{N}$ then $(-1)^{20^{100500}} = 1$. Therefore
$$177^{20^{100500}} \pmod{60}\equiv 3\ (\mathrm{mod}\ 60)^{20^{100500}}$$
But I have no idea what to do here.
Thanks for your help.
\pmod
as in$61\equiv1\pmod{60}$
and\bmod
as in$61\bmod60=1$
$61\bmod60=1$. I was not sure whether the last occurrence is supposed to be $(3\bmod 60)^{exponent}$ rather than $3(\textrm{mod}60)^{exponent}$, so I did not edit that one. $\endgroup$