OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..5000
FORMULA
a(n) = Sum_{d|n} phi(n/d) * d^(n/d).
MATHEMATICA
a[n_] := Sum[GCD[k, n]^(n/GCD[k, n]), {k, 1, n}]; Array[a, 40] (* Amiram Eldar, Mar 11 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, gcd(k, n)^(n/gcd(k, n)));
(PARI) a(n) = sumdiv(n, d, eulerphi(n/d)*d^(n/d));
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 11 2021
STATUS
approved