OFFSET
1,2
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..10000
László Tóth, Alternating sums concerning multiplicative arithmetic functions, arXiv preprint arXiv:1608.00795 [math.NT], 2016.
FORMULA
a(n) is multiplicative with a(2^e) = 1 - 2^(e+1) if e > 0, a(p^e) = (p^(e+1) - 1) / (p - 1) if p > 2.
G.f.: Sum_{k>0} k * -(-x)^k / (1 - (-x)^k) = Sum_{k>0} -(-x)^k / (1 - (-x)^k)^2.
Dirichlet g.f.: zeta(s) * zeta(s-1) * (1 - 6 / 2^s + 4 / 4^s).
Sum_{k=1..n} a(k) ~ -(Pi^2/48) * n^2. - Amiram Eldar, Oct 28 2023
EXAMPLE
q - 3*q^2 + 4*q^3 - 7*q^4 + 6*q^5 - 12*q^6 + 8*q^7 - 15*q^8 + 13*q^9 + ...
MATHEMATICA
Table[-(-1)^n*DivisorSigma[1, n], {n, 69}] (* Michael De Vlieger, Aug 19 2017 *)
PROG
(PARI) {a(n) = if( n<1, 0, -(-1)^n * sigma(n))}
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Michael Somos, Aug 09 2008
STATUS
approved