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 . On the other hand, since for all integer by Fermat's little theorem, we have . Now you probably plan to use the Chinese remainder theorem, which says that all solutions to the system of equations , are congruent modulo . Since 2 and are solutions, .8^99
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, for all n > 0. However, 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 , we conclude that is the 3rd element of the four-element period, i.e., 2. Formally, .