OFFSET
1,5
LINKS
Seiichi Manyama, 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
G.f.: (Sum_{k>=1} mu(k)^2 * x^k) / (1 + x).
a(n) = -a(n-1) + A008966(n) for n > 1.
abs(a(n)) = (2/Pi^2) * n + O(R(n)), where R(n) = x^(1/2)*exp(-c * log(n)^(3/5) / log(log(n))^(1/5)) and c is a positive constant, unconditionally, or x^(11/35+eps) assuming the Riemann hypothesis (Tóth, 2017). - Amiram Eldar, Mar 05 2024
MATHEMATICA
With[{m = 100}, -(-1)^Range[m] * Accumulate[Array[(-1)^(# + 1) * MoebiusMu[#]^2 &, m]]] (* Amiram Eldar, Mar 05 2024 *)
PROG
(PARI) a(n) = sum(k=1, n, (-1)^(n-k)*moebius(k)^2);
(PARI) lista(kmax) = {my(s = 0); for(k = 1, kmax, s += (-1)^(k+1)*moebius(k)^2; print1((-1)^(k+1)*s, ", "))}; \\ Amiram Eldar, Mar 05 2024
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Seiichi Manyama, Apr 05 2023
STATUS
approved