A229784 a(n) = (1^1^1 + 2^2^2 . . . + n^n^n) mod 10.
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
Offset: 0
Links
- Ray Chandler, Table of n, a(n) for n = 0..999
- 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).
Programs
-
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 *)
-
PARI
a(n)=lift(sum(k=1,n%100,Mod(k,10)^k^k)) \\ Charles R Greathouse IV, Dec 27 2013
-
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) A229784_list = list(islice(A229784_gen(),40)) # Chai Wah Wu, Jun 17 2022
Extensions
a(0)=0 prepended by Alois P. Heinz, Jun 17 2022
Comments