cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A185353 a(n) = (1^1 + 2^2 . . . + n^n) mod 10.

This page as a plain text file.
%I A185353 #31 Sep 18 2024 10:34:13
%S A185353 1,5,2,8,3,9,2,8,7,7,8,4,7,3,8,4,1,5,4,4,5,9,6,2,7,3,6,2,1,1,2,8,1,7,
%T A185353 2,8,5,9,8,8,9,3,0,6,1,7,0,6,5,5,6,2,5,1,6,2,9,3,2,2,3,7,4,0,5,1,4,0,
%U A185353 9,9,0,6,9,5,0,6,3,7,6,6,7,1,8,4,9,5,8,4,3,3,4,0,3,9,4,0,7,1,0,0
%N A185353 a(n) = (1^1 + 2^2 . . . + n^n) mod 10.
%C A185353 The last digit of 1^1 + 2^2 +...+ n^n, which has period 100.
%H A185353 G. C. Greubel, <a href="/A185353/b185353.txt">Table of n, a(n) for n = 1..1000</a>
%t A185353 Mod[Accumulate[Table[n^n, {n, 200}]], 10] (* _T. D. Noe_, Jan 27 2012 *)
%o A185353 (PARI) a(n) = sum(k=1, n, k^k) % 10; \\ _Michel Marcus_, Jun 28 2017
%o A185353 (Python)
%o A185353 from itertools import accumulate, count, islice
%o A185353 def A185353_gen(): # generator of terms
%o A185353     yield from accumulate((pow(k,k,10) for k in count(1)),func=lambda x,y:(x+y)%10)
%o A185353 A185353_list = list(islice(A185353_gen(),40)) # _Chai Wah Wu_, Jun 17 2022
%Y A185353 Cf. A000312 (n^n), A001923 (1^1 + 2^2 +...+ n^n).
%K A185353 nonn
%O A185353 1,2
%A A185353 _Muhammed Hedayet_, Jan 26 2012
%E A185353 Extended by _T. D. Noe_, Jan 27 2012