224k views
5 votes
How do you find the last digit of a exponent powering 2

1 Answer

2 votes

Answer:

2^(1 + ((n-1) mod 4)) mod 10

Explanation:

We presume you want the last digit of the power of 2, not the last digit of the exponent. Powers of 2 mod 10 are ...

2^0 : 1

2^1 : 2

2^2 : 4

2^3 : 8

2^4 : 6

2^5 : 2 . . . . and the sequence repeats: 2, 4, 8, 6, ...

That is, ...

(2^n) mod 10 = 2^(1 + ((n-1) mod 4)) mod 10 . . . for n > 0

User FlappySocks
by
5.3k points