Respuesta :

Answer:

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

Step-by-step 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

Otras preguntas