OFFSET
1,4
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
FORMULA
a(n) = A308481(n) mod n. - Seiichi Manyama, Feb 11 2021
MATHEMATICA
S[n_] := Mod[Sum[If[GCD[i, n] == 1, PowerMod[i, n, n], 0], {i, 1, n}], n]; Array[S, 100]
PROG
(PARI) f(i, n) = if (gcd(i, n) == 1, i, 0);
a(n) = lift(sum(k=1, n, Mod(f(k, n), n)^n)); \\ Michel Marcus, Jul 16 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Dec 09 2013
STATUS
approved