login
A342423
a(n) = Sum_{k=1..n} gcd(k,n)^gcd(k,n).
10
1, 5, 29, 262, 3129, 46693, 823549, 16777484, 387420549, 10000003145, 285311670621, 8916100495490, 302875106592265, 11112006826381589, 437893890380865741, 18446744073726329368, 827240261886336764193, 39346408075296925089309
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{d|n} phi(n/d) * d^d.
MATHEMATICA
a[n_] := Sum[GCD[k, n]^GCD[k, n], {k, 1, n}]; Array[a, 18] (* Amiram Eldar, Mar 11 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, gcd(k, n)^gcd(k, n));
(PARI) a(n) = sumdiv(n, d, eulerphi(n/d)*d^d);
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 11 2021
STATUS
approved