OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(p^e) = ((e+1)*p - 1) * p^(e-1). - Amiram Eldar, Sep 15 2019
a(n) = Sum_{k=1..n, gcd(n,k) = 1} sigma(gcd(n,k-1)). - Ilya Gutkovskiy, Sep 24 2021
Dirichlet g.f.: zeta(s-1)^2 * Product_{p prime} (1 - 1/p^s + 1/p^(2*s-1)). - Amiram Eldar, Sep 21 2023
MAPLE
with(numtheory):for n from 1 to 200 do di := sort(convert(divisors(n), list)): a[n] := sum(di[i]*phi(n)/phi(di[i]), i=1..nops(di)):od:seq(a[k], k=1..200);
MATHEMATICA
f[p_, e_] := ((e+1)*p - 1) * p^(e-1) ; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Sep 15 2019 *)
PROG
(PARI) a(n) = sumdiv(n, d, d*eulerphi(n)/eulerphi(d)); \\ Michel Marcus, Sep 15 2019
(Magma) [&+[d*EulerPhi(n) div EulerPhi(d):d in Divisors(n)]:n in [1..60]]; // Marius A. Burtea, Sep 15 2019
CROSSREFS
KEYWORD
mult,easy,nonn
AUTHOR
Vladeta Jovovic, Apr 10 2002
EXTENSIONS
More terms from Sascha Kurz, Feb 02 2003
STATUS
approved