Originally Posted by

**zunecrazy** Maybe I'm being dense but I really really don't understand at all. I'm terrible at math. If anyone could break this down to the most simplest, layman terms I would be forever grateful.

Well, I'll try.

So, we're repeatedly multiplying by 3; note what happens when we multiply some multi-digit number by 3:

Code:

802
x 3
------
2406

Notice that the 8 and 0 in 802 have no effect on the last digit of the product; only the 2 matters.

So, 23984792387498237498237498327948327 * 3, what's the last digit? You can ignore all the digits except for the last, and immediately reply, the last digit is 1.

So,

3^0 ends with 1.

3^1 ends with 3.

3^2 ends with 9.

3^3 ends with 7.

3^4 ends with 1.

We are back where we started, and the cycle must continue.

Then notice this

Code:

n r
------------
0 = 0*4 + 0
1 = 0*4 + 1
2 = 0*4 + 2
3 = 0*4 + 3
4 = 1*4 + 0
5 = 1*4 + 1
6 = 1*4 + 2
...

n represents the exponent, and r represents the remainder when n is divided by 4. Knowing r tells us what the last digit of 3^n is. We go according to

3^0 ends with 1.

3^1 ends with 3.

3^2 ends with 9.

3^3 ends with 7.

...

So for the actual problem, we want to know what the remainder of 2719 is when divided by 4. Turns out it is 3. Therefore the last digit of 3^2719 is 7.