%I #21 Aug 12 2023 04:36:26
%S 1,-3,-2,5,-4,6,-6,-11,7,12,-10,-10,-12,18,8,21,-16,-21,-18,-20,12,30,
%T -22,22,21,36,-20,-30,-28,-24,-30,-43,20,48,24,35,-36,54,24,44,-40,
%U -36,-42,-50,-28,66,-46,-42,43,-63,32,-60,-52,60,40,66,36,84,-58,40,-60,90,-42,85,48,-60,-66,-80,44,-72,-70,-77,-72,108,-42
%N Expansion of Sum_{k>=1} lambda(k) * k * x^k/(1 + x^k) where lambda(k) is the Liouville function, A008836.
%C Related to the logarithmic derivative of A118207(x) and A118208(x).
%C Related to a signed variant of A022998 via Mobius inversion. - _R. J. Mathar_, Jul 03 2011
%H Amiram Eldar, <a href="/A118209/b118209.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = Sum_{d|n} (-1)^(n/d - 1)*lambda(d)*d, Dirichlet convolution of A061019 and A062157.
%F G.f.: A(x) is x times the logarithmic derivative of A118207(x).
%F G.f.: A(x) = A061020(x) - 2 A061020(x^2).
%F Dirichlet g.f.: zeta(s)*zeta(2s-2)*(1-2^(1-s))/zeta(s-1). - _R. J. Mathar_, Jul 03 2011
%F a(n) > 0 for n in A028260. - _Michel Marcus_, Dec 10 2016
%F Multiplicative with a(2^e) = ((-1)^e*2^(e+2) - 1)/3, and a(p^e) = (p*(-p)^e+1)/(p+1) for an odd prime p. - _Amiram Eldar_, Aug 12 2023
%t nmax = 80; lambda[k_Integer?Positive] := If[ k > 1, (-1)^Total[ Part[Transpose[FactorInteger[k]], 2] ], 1 ]; Drop[ CoefficientList[ Series[ Sum[ lambda[k] k x^k/(1 + x^k), {k, 1, nmax} ], {x, 0, nmax} ], x ], 1 ]
%t f[p_, e_] := (p*(-p)^e+1)/(p+1); f[2, e_] := ((-1)^e*2^(e+2) - 1)/3; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Aug 12 2023 *)
%o (PARI) a(n) = sumdiv(n, d, (-1)^(n/d - 1)*(-1)^vecsum(factor(d)[,2])*d) \\ _Michel Marcus_, Dec 10 2016
%Y Cf. A008836, A022998, A028260, A061019, A061020, A062157, A117212, A118207, A118208.
%K sign,easy,mult
%O 1,2
%A _Stuart Clary_, Apr 15 2006