OFFSET
1,2
FORMULA
If p is prime, a(p) = A000217(p-1) + p^p = (p-1)*p/2 + p^p.
MATHEMATICA
a[n_] := Sum[k^GCD[k, n], {k, 1, n}]; Array[a, 18] (* Amiram Eldar, Mar 10 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, k^gcd(k, n));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Mar 10 2021
STATUS
approved