OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
László Tóth, Alternating Sums Concerning Multiplicative Arithmetic Functions, Journal of Integer Sequences, Vol. 20 (2017), Article 17.2.1.
FORMULA
MATHEMATICA
f[p_, e_] := If[OddQ[e], (p^(e+1)-1)/(p-1), (p^(e+1)-1)/(p-1)-p^(e/2)]; bsigma[1] = 1; bsigma[n_] := Times @@ f @@@ FactorInteger[n]; Accumulate[Array[(-1)^(# + 1) * bsigma[#] &, 100]]
PROG
(PARI) bsigma(n) = {my(f = factor(n)); prod(i=1, #f~, p = f[i, 1]; e = f[i, 2]; if(e%2, (p^(e+1)-1)/(p-1), (p^(e+1)-1)/(p-1)-p^(e/2))); }
lista(kmax) = {my(s = 0); for(k = 1, kmax, s += (-1)^(k+1) * bsigma(k); print1(s, ", "))};
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Amiram Eldar, Mar 05 2024
STATUS
approved