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.

A343932 a(n) = (Sum_{k=1..n} k^k) mod n.

Original entry on oeis.org

0, 1, 2, 0, 3, 5, 5, 4, 1, 7, 3, 4, 11, 13, 3, 4, 0, 15, 0, 4, 14, 13, 10, 20, 22, 11, 25, 20, 21, 1, 18, 4, 6, 17, 27, 12, 31, 27, 20, 28, 6, 41, 34, 32, 31, 45, 45, 4, 11, 25, 39, 48, 21, 45, 46, 12, 53, 47, 41, 32, 9, 5, 55, 4, 25, 7, 47, 8, 45, 19, 12, 60, 50, 43, 20, 60, 54, 29, 72, 36, 70, 31, 74, 40, 69, 7, 18, 20, 63, 3, 24, 32
Offset: 1

Views

Author

Seiichi Manyama, May 04 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[Sum[PowerMod[k, k, n], {k, 1, n}], n]; Array[a, 100] (* Amiram Eldar, May 04 2021 *)
  • PARI
    a(n) = sum(k=1, n, k^k)%n;
    
  • Python
    def A343932(n): return sum(pow(k,k,n) for k in range(1,n+1)) % n # Chai Wah Wu, Jun 18 2022

Formula

a(n) = A001923(n) mod n.