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.

User: Muhammed Hedayet

Muhammed Hedayet's wiki page.

Muhammed Hedayet has authored 1 sequences.

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

Original entry on oeis.org

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, 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, 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
Offset: 1

Author

Muhammed Hedayet, Jan 26 2012

Keywords

Comments

The last digit of 1^1 + 2^2 +...+ n^n, which has period 100.

Crossrefs

Cf. A000312 (n^n), A001923 (1^1 + 2^2 +...+ n^n).

Programs

  • Mathematica
    Mod[Accumulate[Table[n^n, {n, 200}]], 10] (* T. D. Noe, Jan 27 2012 *)
  • PARI
    a(n) = sum(k=1, n, k^k) % 10; \\ Michel Marcus, Jun 28 2017
    
  • Python
    from itertools import accumulate, count, islice
    def A185353_gen(): # generator of terms
        yield from accumulate((pow(k,k,10) for k in count(1)),func=lambda x,y:(x+y)%10)
    A185353_list = list(islice(A185353_gen(),40)) # Chai Wah Wu, Jun 17 2022

Extensions

Extended by T. D. Noe, Jan 27 2012