OFFSET
1,2
COMMENTS
The last digit of 1^1 + 2^2 +...+ n^n, which has period 100.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
MATHEMATICA
Mod[Accumulate[Table[n^n, {n, 200}]], 10] (* T. D. Noe, Jan 27 2012 *)
PROG
(PARI) a(n) = sum(k=1, n, k^k) % 10; \\ Michel Marcus, Jun 28 2017
(Python)
from itertools import accumulate, count, islice
def A185353_gen(): # generator of terms
yield from accumulate((pow(k, k, 10) for k in count(1)), func=lambda x, y:(x+y)%10)
CROSSREFS
KEYWORD
nonn
AUTHOR
Muhammed Hedayet, Jan 26 2012
EXTENSIONS
Extended by T. D. Noe, Jan 27 2012
STATUS
approved