cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A370906 Partial alternating sums of the alternating sum of divisors function (A206369).

This page as a plain text file.
%I A370906 #11 Mar 05 2024 15:54:25
%S A370906 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,
%T A370906 70,52,80,72,102,81,101,85,109,88,124,106,130,110,150,138,180,150,178,
%U A370906 156,202,180,223,202,234,198,250,230,270,240,276,248,306,282,342
%N A370906 Partial alternating sums of the alternating sum of divisors function (A206369).
%H A370906 Amiram Eldar, <a href="/A370906/b370906.txt">Table of n, a(n) for n = 1..10000</a>
%H A370906 László Tóth, <a href="https://www.emis.de/journals/JIS/VOL20/Toth/toth25.html">Alternating Sums Concerning Multiplicative Arithmetic Functions</a>, Journal of Integer Sequences, Vol. 20 (2017), Article 17.2.1.
%F A370906 a(n) = Sum_{k=1..n} (-1)^(k+1) * A206369(k).
%F A370906 a(n) = (Pi^2/120) * n^2 + O(n * log(n)^(2/3) * log(log(n))^(4/3)) (Tóth, 2017).
%t A370906 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]]
%o A370906 (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));}
%o A370906 lista(kmax) = {my(s = 0); for(k = 1, kmax, s += (-1)^(k+1) * beta(k); print1(s, ", "))};
%o A370906 (Python)
%o A370906 from math import prod
%o A370906 from sympy import factorint
%o A370906 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
%Y A370906 Cf. A206369, A370905.
%Y A370906 Similar sequences: A068762, A068773, A307704, A357817, A362028.
%K A370906 sign,easy
%O A370906 1,3
%A A370906 _Amiram Eldar_, Mar 05 2024