OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = sum((-1)^(k+1)*sigma(k), k=1..n)
a(n) ~ -Pi^2 * n^2 / 48. - Vaclav Kotesovec, Aug 07 2022
EXAMPLE
a(3) = sigma(1) - sigma(2) + sigma(3) = 1 - 3 + 4 = 2.
MATHEMATICA
Accumulate[Times@@@Partition[Riffle[DivisorSigma[1, Range[60]], {1, -1}, {2, -1, 2}], 2]] (* Harvey P. Dale, Dec 12 2014 *)
Accumulate[Table[-(-1)^k*DivisorSigma[1, k], {k, 1, 60}]] (* Vaclav Kotesovec, Aug 07 2022 *)
PROG
(PARI) a068762(m)=local(s, n); s=0; for(n=1, m, if(n%2==0, s=s-sigma(n), s=s+sigma(n)); print1(s, ", "))
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Klaus Brockhaus, Feb 28 2002
STATUS
approved