We have to find the value of 3^7 mod 7.
We can start with 3^7:
![3^7=2187](https://img.qammunity.org/2023/formulas/mathematics/college/gdgfz44wt3f3v4umuipzqbqft9bxjb0ocd.png)
Now we have to find the remainder of 2187/7.
We can look por multiples of 7 until we reach the closest (but smaller) one to 2187.
We can start with 2100, which is 7*300.
We can add 2177 as if 2100 and 77 are multiples of 7, the sum of them will be.
We can add another 7 and get 2184.
As 2187 and 2184 are 3 units apart, that is the remainder and the answer to this expression.
Answer: 3^7 mod 7 = 3