login
a(n) = Sum_{d|n} (-1)^(n/d+1)*tau(d), where tau = number of divisors (A000005).
7

%I #52 Jan 13 2024 07:38:20

%S 1,1,3,0,3,3,3,-2,6,3,3,0,3,3,9,-5,3,6,3,0,9,3,3,-6,6,3,10,0,3,9,3,-9,

%T 9,3,9,0,3,3,9,-6,3,9,3,0,18,3,3,-15,6,6,9,0,3,10,9,-6,9,3,3,0,3,3,18,

%U -14,9,9,3,0,9,9,3,-12,3,3,18,0,9,9,3,-15,15,3,3,0,9

%N a(n) = Sum_{d|n} (-1)^(n/d+1)*tau(d), where tau = number of divisors (A000005).

%C Dirichlet convolution of A048272 and A000012. - _Vaclav Kotesovec_, Jan 13 2024

%H Antti Karttunen, <a href="/A288571/b288571.txt">Table of n, a(n) for n = 1..65537</a>

%F G.f.: Sum_{k>=1} tau(k)*x^k/(1 + x^k).

%F L.g.f.: log(Product_{k>=1} (1 + x^k)^(tau(k)/k)) = Sum_{n>=1} a(n)*x^n/n.

%F Multiplicative with a(2^e) = (e+1)*(2-e)/2, and a(p^e) = (e+1)*(e+2)/2 for an odd prime p. - _Amiram Eldar_, Oct 25 2020

%F From _Amiram Eldar_, Sep 14 2023: (Start)

%F Dirichlet g.f.: (1- 1/2^(s-1)) * zeta(s)^3.

%F Sum_{k=1..n} a(k) ~ log(2) * n * (log(n) + 3*gamma - 1 - log(2)/2), where gamma is Euler's constant (A001620). (End)

%p with(numtheory): seq(add((-1)^(n/a+1)*tau(a),a=divisors(n)),n=1..85); # _Paolo P. Lava_, Aug 24 2018

%t Table[Sum[(-1)^(n/d + 1) DivisorSigma[0, d], {d, Divisors[n]}], {n, 85}]

%t nmax = 85; Rest[CoefficientList[Series[Sum[DivisorSigma[0, k] x^k/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x]]

%t nmax = 85; Rest[CoefficientList[Series[Log[Product[(1 + x^k)^(DivisorSigma[0, k]/k), {k, 1, nmax}]], {x, 0, nmax}], x] Range[0, nmax]]

%t f[p_, e_] := If[p == 2, (e + 1)*(2 - e)/2, (e + 1)*(e + 2)/2]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* _Amiram Eldar_, Oct 25 2020 *)

%o (PARI) a(n) = sumdiv(n, d, (-1)^(n/d+1)*numdiv(d)); \\ _Michel Marcus_, Aug 24 2018

%Y Cf. A000005, A001620, A007425, A017113 (positions of 0's), A048272, A288417, A317531.

%K sign,mult,hear,easy

%O 1,3

%A _Ilya Gutkovskiy_, Aug 23 2018