OFFSET
1,2
LINKS
Martin Ehrenstein, Table of n, a(n) for n = 1..400
FORMULA
If p is prime, a(p) = p-1 + p^(p-1) = A173235(p).
MATHEMATICA
a[n_] := Sum[GCD[k, n]^(k - 1), {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Mar 13 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, gcd(k, n)^(k-1));
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 13 2021
EXTENSIONS
a(19) and beyond from Martin Ehrenstein, Mar 13 2021
STATUS
approved