login
Sum of mu(d)*phi(d) over divisors d of n.
5

%I #38 Jan 21 2024 02:16:36

%S 1,0,-1,0,-3,0,-5,0,-1,0,-9,0,-11,0,3,0,-15,0,-17,0,5,0,-21,0,-3,0,-1,

%T 0,-27,0,-29,0,9,0,15,0,-35,0,11,0,-39,0,-41,0,3,0,-45,0,-5,0,15,0,

%U -51,0,27,0,17,0,-57,0,-59,0,5,0,33,0,-65,0,21,0,-69,0,-71,0,3,0,45,0,-77,0,-1,0,-81,0,45,0,27,0,-87,0,55,0,29,0,51,0,-95,0,9

%N Sum of mu(d)*phi(d) over divisors d of n.

%C Discovered when incorrectly applying Mobius inversion formula.

%C a(n)*a(m) = a(n*m) if gcd(n,m)=1 (has a simple proof).

%C Strongly multiplicative: a(p^e) = 2 - p. - _Charles R Greathouse IV_, Oct 01 2019

%H Indranil Ghosh, <a href="/A276833/b276833.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = Sum_{d|n} mu(d)*phi(d).

%F G.f.: Sum_{k>=1} mu(k)*phi(k)*x^k/(1 - x^k). - _Ilya Gutkovskiy_, Nov 06 2018

%F a(n) = Product_{p prime and p|n} (2-p). - _Robert FERREOL_, Mar 14 2020

%F Dirichlet g.f.: zeta(s) * Product_{primes p} (1 - p^(1-s) + p^(-s)). - _Vaclav Kotesovec_, Jun 14 2020

%F a(n) = Sum_{k = 1..n} mu(lcm(k, n)/k). - _Peter Bala_, Jan 16 2024

%e mu(d)*phi(d) = 1*1,-1*1,-1*2, 1*2 for d=1,2,3,6, so a(6) = 1*1-1*1-1*2+1*2 = 0.

%p with(numtheory):seq(convert(map(x->2-x,factorset(n)),`*`),n=1..99); # _Robert FERREOL_, Mar 14 2020

%t Table[Sum[MoebiusMu[d] EulerPhi[d], {d, Divisors[n]}], {n, 99}] (* _Indranil Ghosh_, Mar 10 2017 *)

%t a[1] = 1; a[n_] := Times @@ ((2 - First[#])& /@ FactorInteger[n]); Array[a, 100] (* _Amiram Eldar_, Sep 21 2020 *)

%o (PARI) r=0;fordiv(n,d,r+=moebius(d)*eulerphi(d));r

%o (PARI) a(n) = sumdiv(n, d, moebius(d)*eulerphi(d)); \\ _Michel Marcus_, Sep 30 2016

%o (PARI) a(n)=my(f=factor(n)[,1]); prod(i=1,#f, 2-f[i]) \\ _Charles R Greathouse IV_, Oct 01 2019

%o (PARI) for(n=1, 100, print1(direuler(p=2, n, (1 - p*X + X)/(1 - X))[n], ", ")) \\ _Vaclav Kotesovec_, Jun 14 2020

%Y For squarefree numbers, the absolute value is equal to A166586 (first exception at 25).

%Y Cf. A097945.

%K mult,sign,easy

%O 1,5

%A _Jurjen N.E. Bos_, Sep 20 2016