Unit Digit

“I’m Overwhelmed” Tickbox Quix #2 - Question 15:

What is the remainder of 3^40 divided by 5?

I understand that I have to look for the pattern of the following:
3^1 = 3
3^2 = 9
3^3 = 27
3^4 = 81

Greg states that since 40 is a multiple of 4, we know the unit digit will be 1. But 40 is also a multiple of 2, so how can we rule out 9 as being the unit digit?

Thanks in advance for the help.

Hi, so in such questions we try to find the cyclicity i.e. after how many times will the pattern repeat.

So for 3, the cyclicity is 4,
3^1 = 3
3^2 = 9
3^3 = 27
3^4 = 81

3^5 = 243
3^6 = 729
3^7 = 2187
3^8 = 6561

So the units digit pattern is (3,9, 7, 1) and this repeats again.

  1. If we get a power of the form 4n + 1, unit’s digit is 3
  2. If we get a power of the form 4n + 2, unit’s digit is 9
  3. If we get a power of the form 4n + 3, unit’s digit is 7
  4. If we get a power of the form 4n + 4, unit’s digit is 1 (40 comes in this case for n=9)

We do not consider 2 as a potential divisor because this pattern repeats after every 4th number not after every 2nd number. Here, for example, we can say that the unit’s digit for 3^1 and 3^5 is same but not for 3^1 and 3^3