Find the last digit of (a). 13^121, (b). 8^99, (c). 777^777
I know there's something I do to write these as smaller numbers, but am unsure on how to do this.
You are correct that $\displaystyle 8^{99}\equiv0\pmod{2}$. On the other hand, since $\displaystyle n^4\equiv1\pmod{5}$ for all integer $\displaystyle 1\le n<5$ by Fermat's little theorem, we have $\displaystyle 8^{99}\equiv3^{99}\equiv(3^4)^{24}\cdot3^3\equiv3^ 3\equiv2\pmod{5}$. Now you probably plan to use the Chinese remainder theorem, which says that all solutions to the system of equations $\displaystyle x\equiv0\pmod{2}$, $\displaystyle x\equiv2\pmod{5}$ are congruent modulo $\displaystyle 2\cdot 5$. Since 2 and $\displaystyle 8^{99}$ are solutions, $\displaystyle 8^{99}\equiv2\pmod{10}$.8^99
=0 mod2
3^99 mod 5
3^4 mod 5
=1 mod 5
One benefit of this approach is that use can use Fermat's little theorem. In contrast, $\displaystyle 8^n\not\equiv1\pmod{10}$ for all n > 0. However, $\displaystyle 8^n$ modulo 10 forms a periodic sequence 8, 4, 2, 6, 8, 4, ... with period 4, as has been said above (and to which you have not responded). Since $\displaystyle 99\equiv3\pmod{4}$, we conclude that $\displaystyle 8^{99}$ is the 3rd element of the four-element period, i.e., 2. Formally, $\displaystyle 8^{99}\equiv(8^4)^{24}\cdot 8^3\equiv6^{24}\cdot2\equiv6\cdot2\equiv2\pmod{10}$.