%I #37 Dec 06 2022 07:56:55
%S 1,-3,-5,1,-9,15,-13,1,4,27,-21,-5,-25,39,45,1,-33,-12,-37,-9,65,63,
%T -45,-5,16,75,4,-13,-57,-135,-61,1,105,99,117,4,-73,111,125,-9,-81,
%U -195,-85,-21,-36,135,-93,-5,36,-48,165,-25,-105,-12,189,-13,185,171,-117,45,-121,183,-52,1,225,-315,-133,-33,225,-351,-141,4
%N Dirichlet inverse of the gcd-sum function (A018804).
%H Reinhard Zumkeller, <a href="/A101035/b101035.txt">Table of n, a(n) for n = 1..10000</a>
%H G. P. Michon, <a href="http://www.numericana.com/answer/numbers.htm#multiplicative">Multiplicative Functions</a>.
%F Multiplicative function with a(p)=1-2p and a(p^e)=(p-1)^2 when e>1 [p prime].
%F Dirichlet g.f.: zeta(s)/zeta^2(s-1). - _R. J. Mathar_, Apr 10 2011
%F a(n) = Sum{d|n} tau_{-2}(d)*d, where tau_{-2} is A007427. - _Enrique Pérez Herrero_, Jan 19 2013
%F Conjecture: Logarithmic g.f. Sum_{n>0,k>0} mu(n)*mu(k)*log(1/(1-x^(n*k))). - _Benedict W. J. Irwin_, Jul 26 2017
%e a(4)=1, a(8)=1, a(16)=1, a(32)=1, etc. because of the multiplicative definition for powers of 2.
%t DirichletInverse[f_][1] = 1/f[1]; DirichletInverse[f_][n_] := DirichletInverse[f][n] = -1/f[1]*Sum[ f[n/d]*DirichletInverse[f][d], {d, Most[ Divisors[n]]}]; GCDSum[n_] := Sum[ GCD[n, k], {k, 1, n}]; Table[ DirichletInverse[ GCDSum][n], {n, 1, 72}](* _Jean-François Alcover_, Dec 12 2011 *)
%t f[p_, e_] := If[e == 1, 1 - 2*p, (p - 1)^2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Dec 06 2022 *)
%o (Haskell)
%o a101035 n = product $ zipWith f (a027748_row n) (a124010_row n) where
%o f p 1 = 1 - 2 * p
%o f p e = (p - 1) ^ 2
%o -- _Reinhard Zumkeller_, Jul 16 2012
%o (PARI) seq(n)={dirdiv(vector(n, n, n==1), vector(n, n, sumdiv(n, d, n*eulerphi(d)/d)))} \\ _Andrew Howroyd_, Aug 05 2018
%o (PARI) for(n=1, 100, print1(direuler(p=2, n, (1 - p*X)^2/(1 - X))[n], ", ")) \\ _Vaclav Kotesovec_, Aug 22 2021
%Y Cf. A018804, A055615, A046692, A023900, A007427, A053822, A053825, A053826.
%Y Cf. A008683.
%K easy,nice,sign,mult
%O 1,2
%A _Gerard P. Michon_, Nov 27 2004