OFFSET
1,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A001923(n) mod n.
MATHEMATICA
a[n_] := Mod[Sum[PowerMod[k, k, n], {k, 1, n}], n]; Array[a, 100] (* Amiram Eldar, May 04 2021 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, May 04 2021
STATUS
approved