38.2k views
2 votes
How do I determine 8^402 mod 5?

User Goroncy
by
7.8k points

1 Answer

4 votes
It would be a great idea to narrowing it down to (2^3)^134 mod 5. now it is easier cause 8 = 3 (mod 5), let's compute 3^402 (mod 5).
3^4 = 81 = 1 (mod 5).
Therefore, 3^402 = (3^4)^100 * 2^2 = 1^100 * 4 = 4 (mod 5).
User Valmond
by
7.3k points