Manhattan 5lb Divisibility and Primes question 28

I am trying to find out the last digit. I am not able to understand the solution given in the book. Can someone explain how to do it?

Hint : If a number is being divided by 10 , then the remainder is just the last digit of that number . So, find what will the unit digits of 3^17 and 7^13

1 Like

This is interesting, could you explain the logic behind this one? I missed a problem very similar to this one recently, so your advice on how to solve it would be greatly appreciated.

Let’s first take a look at 13^17:

What is the units digit when we take 13^2? To figure this out, we need only look at the unit digit of each number we are multiplying. In this case, 3*3 = 9. So the unit digit of 13^2 = 9.

How about the unit digit of 13^3? Well we know 13^3 = 13^2 * 13, and so the units digit will be the units digit of 9 (the units digit of 13^2) * 3 (the units digit of 13) = 27 i.e. 7.

Continuing on with this process: units digit of 13^4 = 1 (units digit of 7 * 3), units digit of 13^5 (units digit of 1 * 3) = 3.

Aha! Notice that we have cycled back to three; that is, the units digit of 13^5 is the same as the units digit of 13^1. From this fact, we know that the units digit of 13^6 will be 9, the units digit of 13^7 will be 7 (i.e. the same pattern as before). In other words, the units digit of 13^n is:

  • 3 if n divided by 4 has remainder = 1
  • 9 if n divided by 4 has remainder = 2
  • 7 if n divided by 4 has remainder = 3
  • 1 if n divided by 4 has remainder = 0

From this pattern, the units digit of 3^17 must be 3 (since 17 divided 4 has remainder =1).

We can do the same thing for 17^13:
Units digit of 17^2 is 9, units digit of 17^3 = 17^2 * 17 is 3, units digit of 17^4 = 17^3 * 17 is 1, units digit of 17^5 = 17^4 * 17 is 7. We have reached a number we have already seen (7), and so our cycle is complete! Accordingly, 17^n has units digit

  • 7 if n divided by 4 has remainder = 1
  • 9 if n divided by 4 has remainder = 2
  • 3 if n divided by 4 has remainder = 3
  • 1 if n divided by 4 has remainder = 0

Thus 17^13 has units digit 7 (13 divided by 4 has remainder 1).

Now, 3^17 has units digit 3 and 17^13 has units digit 7 so 3^17 + 7^13 has units digit 3+7 = 0. When a number with units digit 0 (ex. 50) is divided by 10, the remainder is = 0.

You’ve got this! :slight_smile:

4 Likes

Thanks a lot. This was very helpful.