The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A370906 Partial alternating sums of the alternating sum of divisors function (A206369). 2
1, 0, 2, -1, 3, 1, 7, 2, 9, 5, 15, 9, 21, 15, 23, 12, 28, 21, 39, 27, 39, 29, 51, 41, 62, 50, 70, 52, 80, 72, 102, 81, 101, 85, 109, 88, 124, 106, 130, 110, 150, 138, 180, 150, 178, 156, 202, 180, 223, 202, 234, 198, 250, 230, 270, 240, 276, 248, 306, 282, 342 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
László Tóth, Alternating Sums Concerning Multiplicative Arithmetic Functions, Journal of Integer Sequences, Vol. 20 (2017), Article 17.2.1.
FORMULA
a(n) = Sum_{k=1..n} (-1)^(k+1) * A206369(k).
a(n) = (Pi^2/120) * n^2 + O(n * log(n)^(2/3) * log(log(n))^(4/3)) (Tóth, 2017).
MATHEMATICA
f[p_, e_] := Sum[(-1)^(e-k)*p^k, {k, 0, e}]; beta[1] = 1; beta[n_] := Times @@ f @@@ FactorInteger[n]; Accumulate[Array[(-1)^(# + 1) * beta[#] &, 100]]
PROG
(PARI) beta(n) = {my(f = factor(n)); prod(i=1, #f~, p = f[i, 1]; e = f[i, 2]; sum(k = 0, e, (-1)^(e-k)*p^k)); }
lista(kmax) = {my(s = 0); for(k = 1, kmax, s += (-1)^(k+1) * beta(k); print1(s, ", "))};
(Python)
from math import prod
from sympy import factorint
def A370906(n): return sum((1 if k&1 else -1)*prod((lambda x:x[0]+int((x[1]<<1)>=p+1))(divmod(p**(e+1), p+1)) for p, e in factorint(k).items()) for k in range(1, n+1)) # Chai Wah Wu, Mar 05 2024
CROSSREFS
Similar sequences: A068762, A068773, A307704, A357817, A362028.
Sequence in context: A191854 A129646 A277640 * A165401 A319916 A213074
KEYWORD
sign,easy
AUTHOR
Amiram Eldar, Mar 05 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 08:56 EDT 2024. Contains 372733 sequences. (Running on oeis4.)