login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A078439
a(n) = Sum_{k=1..n} gcd(k,n)*mu(gcd(k,n))^2.
3
1, 3, 5, 4, 9, 15, 13, 8, 12, 27, 21, 20, 25, 39, 45, 16, 33, 36, 37, 36, 65, 63, 45, 40, 40, 75, 36, 52, 57, 135, 61, 32, 105, 99, 117, 48, 73, 111, 125, 72, 81, 195, 85, 84, 108, 135, 93, 80, 84, 120, 165, 100, 105, 108, 189, 104, 185, 171, 117, 180, 121, 183, 156, 64
OFFSET
1,2
LINKS
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