A229481 Final digit of 1^n + 2^n + ... + n^n.
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
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- 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).
Programs
-
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}]
-
PARI
a(n)=n%=100;lift(sum(k=1,n,Mod(k,10)^n)) \\ Charles R Greathouse IV, Dec 13 2013
Formula
a(n) = a(n-100). - Wesley Ivan Hurt, Jan 02 2024
Comments