Calculate $61^{61} \pmod9$ I have a solution in front of me, but several parts do not quite make sense to me.
Since $61 \equiv −2 \pmod9$, we have
$$61^{61} \equiv (−2)^{61}\equiv −2 \cdot 8^{60}\pmod{9}$$
First question: how do we get from $(-2)^{61}$ is congruent to $(-2)\cdot 8^{60}$?
$$-2\cdot 8^{60}\equiv −2 · (−1)^{61} \pmod{9}$$
Second question: how do we get from $-2 \cdot 8^{60}$ is congruent to $-2 
\cdot (-1)^{61}$?
$$\equiv −2 \equiv 7 \pmod 9.$$

$61^{61}\equiv(-2)^{61}\equiv(-2)(8)^{20}\equiv(-2)(-1)^{20}\equiv-2\equiv7\pmod9.$
Alternatively, by Euler's theorem, $a^6\equiv1\pmod9$ if $\gcd(a,9)=1$,
so $61^{61}\equiv(-2)^{61}\equiv(-2)^{60}(-2)\equiv((-2)^6)^{10}(-2)\equiv7\pmod9.$
