A229522 Final digit (in decimal system) of (n^n)^n, i.e., (n^n)^n mod 10.
1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 3, 6, 5, 6, 7, 6, 9, 0, 1, 6, 3, 6, 5, 6
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
Programs
-
Mathematica
Table[PowerMod[n^n, n, 10], {n, 200}]
-
PARI
a(n)=n%=10; lift(Mod(n,10)^n^n) \\ Charles R Greathouse IV, Dec 27 2013
-
Python
def A229522(n): return (0, 1, 6, 3, 6, 5, 6, 7, 6, 9)[n%10] # Chai Wah Wu, Aug 10 2023
Comments