OFFSET
1,5
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
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;
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, May 04 2021
STATUS
approved