login
A362028
a(n) = Sum_{k=1..n} (-1)^(n-k) * mu(k)^2, where mu(k) is the Moebius function.
11
1, 0, 1, -1, 2, -1, 2, -2, 2, -1, 2, -2, 3, -2, 3, -3, 4, -4, 5, -5, 6, -5, 6, -6, 6, -5, 5, -5, 6, -5, 6, -6, 7, -6, 7, -7, 8, -7, 8, -8, 9, -8, 9, -9, 9, -8, 9, -9, 9, -9, 10, -10, 11, -11, 12, -12, 13, -12, 13, -13, 14, -13, 13, -13, 14, -13, 14, -14, 15, -14, 15, -15, 16, -15, 15, -15, 16, -15, 16, -16, 16, -15, 16, -16, 17
OFFSET
1,5
LINKS
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