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