OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..387
FORMULA
a(n) = Sum_{d|n} phi(n/d) * d^(n-1).
a(n) = Sum_{d|n} mu(n/d) * d * sigma_(n-2)(d).
a(n) ~ n^(n-1). - Vaclav Kotesovec, May 23 2021
MATHEMATICA
a[n_] := Sum[GCD[k, n]^(n - 1), {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Mar 12 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, gcd(k, n)^(n-1));
(PARI) a(n) = sumdiv(n, d, eulerphi(n/d)*d^(n-1));
(PARI) a(n) = sumdiv(n, d, moebius(n/d)*d*sigma(d, n-2));
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 12 2021
STATUS
approved