Remainder patterns

Hello guys. I’m having trouble understanding where the remainder is coming from and how to relate the exponent in the question to the pattern. Got this from Greg at quant flash cards. How do you know that 7^31/5 has a remainder of 4, what does that have to do with 7^3/5?

Pattern recognition. Notice that the remainders of 7^x follow a consistent pattern. You use this to your advantage.

I hardly understood the Prepswift videos titled ‘Remainders and Exponents’ and ‘Remainders and Addition’. Could you please help?

Be more specific - what in that do you not understand?

Finding the remainder of a fraction when the numerator has an exponent. Pretty much everything aside when 10 is the denominator.

Let’s try this: suppose we want to divide 3^{55} with 5. What information do we need to solve this problem?

Identifying a pattern in the unit digits of the exponents of 3?

After watching the video once more, I now understand cases where 2, 3 and 4 and 10 are the divisors.
If the remainder for the fraction above is 2, then I think I also understand how to get the remainder when dividing by 5. Here is how I did it:

3 exp 1: 3 3 exp 5: 3
3 exp 2: 9 3 exp 6: 9
3 exp 3: 7 3 exp 7: 7
3 exp 4: 1 3 exp 8: 1

From the pattern, I deduced that whenever the exponent is a multiple of 4, the resulting number will have a unit digit of 1. Hence, 3 exp 52 will result in a number with a unit digit of 1. I used the pattern to conclude that 3 exp 55 will result in a number with a unit digit 7 (I just realized that, alternatively, I could have worked my way down from 3 exp 56, which is shorter). Since the unit digit is 7, remainder is 7- 5 = 2, right? So if I get the rules for 5 correctly, the remainder equals the unit digit if the unit digit is less than 5. If the unit digit is more than 5, the remainder equals the unit digit minus 5. What then happens when the unit digit is 5? Is the remainder 0?

Yes.

Thanks a lot.