OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = Sum_{d|n} d*mu(d)^2*phi(n/d).
Multiplicative with a(p) = 2*p-1 and a(p^e) = 2*(p-1)*p^(e-1), e>1.
Dirichlet g.f.: zeta(s-1)^2 / (zeta(s) * zeta(2s-2)). - Álvar Ibeas, Mar 20 2015
Sum_{k=1..n} a(k) ~ 9 * n^2 * (2*log(n) + 4*gamma - 1 - 36*Zeta'(2)/Pi^2) / Pi^4, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Feb 01 2019
MATHEMATICA
Table[Sum[d*MoebiusMu[d]^2*EulerPhi[n/d], {d, Divisors[n]}], {n, 1, 100}] (* Vaclav Kotesovec, Feb 01 2019 *)
f[p_, e_] := If[e==1, 2*p-1, 2*(p-1)*p^(e-1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Apr 30 2023 *)
PROG
(PARI) vector(80, n, sumdiv(n, d, d*moebius(d)^2*eulerphi(n/d))) \\ Michel Marcus, Mar 20 2015
(Magma) [&+[Gcd(k, n)*MoebiusMu(Gcd(n, k))^2:k in [1..n]]:n in [1..70]]; // Marius A. Burtea, Sep 15 2019
CROSSREFS
KEYWORD
mult,nonn
AUTHOR
Vladeta Jovovic, Dec 31 2002
STATUS
approved