|
|
A229784
|
|
a(n) = (1^1^1 + 2^2^2 . . . + n^n^n) mod 10.
|
|
2
|
|
|
0, 1, 7, 4, 0, 5, 1, 4, 0, 9, 9, 0, 6, 9, 5, 0, 6, 3, 9, 8, 8, 9, 5, 2, 8, 3, 9, 2, 8, 7, 7, 8, 4, 7, 3, 8, 4, 1, 7, 6, 6, 7, 3, 0, 6, 1, 7, 0, 6, 5, 5, 6, 2, 5, 1, 6, 2, 9, 5, 4, 4, 5, 1, 8, 4, 9, 5, 8, 4, 3, 3, 4, 0, 3, 9, 4, 0, 7, 3, 2, 2, 3, 9, 6, 2, 7, 3, 6, 2, 1, 1, 2, 8, 1, 7, 2, 8, 5, 1, 0, 0, 1, 7, 4, 0, 5, 1, 4, 0, 9, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
The last digit of 1^1^1 + 2^2^2 +...+ n^n^n, which has period 100.
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, -1, 1).
|
|
MATHEMATICA
|
Table[Mod[Sum[PowerMod[i, i^i, 10], {i, 1, n}], 10], {n, 200}]
Mod[Accumulate[Table[PowerMod[i, i^i, 10], {i, 100}]], 10] (* T. D. Noe, Sep 30 2013 *)
|
|
PROG
|
(Python)
from itertools import count, accumulate, islice
def A229784_gen(): # generator of terms
yield from accumulate((pow(k, k**k, 10) for k in count(1)), func=lambda x, y:(x+y)%10)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|