login
A229481
Final digit of 1^n + 2^n + ... + n^n.
1
0, 1, 5, 6, 4, 5, 1, 4, 2, 5, 5, 6, 0, 1, 5, 0, 8, 3, 9, 0, 6, 1, 5, 6, 0, 5, 1, 4, 8, 5, 5, 6, 6, 1, 5, 0, 4, 3, 9, 0, 2, 1, 5, 6, 6, 5, 1, 4, 4, 5, 5, 6, 2, 1, 5, 0, 0, 3, 9, 0, 8, 1, 5, 6, 2, 5, 1, 4, 0, 5, 5, 6, 8, 1, 5, 0, 6, 3, 9, 0, 4, 1, 5, 6, 8, 5, 1, 4, 6, 5, 5, 6, 4, 1, 5, 0, 2, 3, 9, 0
OFFSET
0,3
COMMENTS
Cyclic with period 100.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
FORMULA
a(n) = a(n-100). - Wesley Ivan Hurt, Jan 02 2024
MAPLE
a:= proc(n) local l; l:=[seq(add(k&^i mod 10, k=1..i) mod 10, i=0..99)]:
proc(n) l[1+irem(n, 100)] end
end():
seq(a(n), n=0..200); # Alois P. Heinz, Sep 26 2013
MATHEMATICA
Table[Mod[Sum[PowerMod[i, n, 10], {i, 1, n}], 10], {n, 0, 133}]
PROG
(PARI) a(n)=n%=100; lift(sum(k=1, n, Mod(k, 10)^n)) \\ Charles R Greathouse IV, Dec 13 2013
CROSSREFS
Sequence in context: A128632 A197490 A319015 * A304490 A155591 A152945
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved