OFFSET
1,4
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
MAPLE
a:= n-> add(i&^n, i=1..3) mod n:
seq(a(n), n=1..100); # Alois P. Heinz, Feb 11 2021
MATHEMATICA
a[n_] := Mod[Sum[k^n, {k, 1, 3}], n]; Array[a, 100] (* Amiram Eldar, Feb 11 2021 *)
PROG
(PARI) a(n) = sum(k=1, 3, k^n)%n;
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Feb 11 2021
STATUS
approved