My solution is below, other different solutions can be found in the comments.
Let v1 = 11+sqrt(111) and let v2 = 11-sqrt(111). Note that 1 > v2 > 0.
Then v1 and v2 are the roots of v^2 - 22v + 10 = 0. [Eq1]
Eq1 implies
v1^(n+2) = 22*v1^(n+1) - 10*v1^n [Eq2]
v2^(n+2) = 22*v2^(n+1) - 10*v2^n [Eq3]
Define sequence w[n] = v1^n + v2^n [Eq4]
Then by adding Eq2 and Eq3 and substituting by Eq4:
w[n+2] = 22*w[n+1] - 10*w[n] [Eq5]
By direct calculation w[0] = 2 and w[1] = 22
Since Eq5 is an integer relation, all the terms of w[n] are integers.
Taking the terms of w[n] mod 10 produces the sequence:
d[n] = 2, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, . . .
Since 1 > v2 > 0 then 1 > v2^n > 0
Since w[n] = v1^n + v2^n and 1 > v2^n > 0 then the units digit of v1^n equals d[n] - 1
So, for a positive integer n, the units digit of (11+sqrt(111))^n can be determined as follows:
If n=0 or n mod 4 = 1, then the units digit is 1.
If n mod 4 = 2 then the units digit is 3.
If n mod 4 = 3 then the units digit is 7.
If n>0 and n mod 4 = 0 then the units digit is 5. |