OFFSET
1,2
COMMENTS
Related to a signed variant of A022998 via Mobius inversion. - R. J. Mathar, Jul 03 2011
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: A(x) is x times the logarithmic derivative of A118207(x).
Dirichlet g.f.: zeta(s)*zeta(2s-2)*(1-2^(1-s))/zeta(s-1). - R. J. Mathar, Jul 03 2011
a(n) > 0 for n in A028260. - Michel Marcus, Dec 10 2016
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
MATHEMATICA
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 ]
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 *)
PROG
(PARI) a(n) = sumdiv(n, d, (-1)^(n/d - 1)*(-1)^vecsum(factor(d)[, 2])*d) \\ Michel Marcus, Dec 10 2016
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Stuart Clary, Apr 15 2006
STATUS
approved