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.

A362028 a(n) = Sum_{k=1..n} (-1)^(n-k) * mu(k)^2, where mu(k) is the Moebius function.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Apr 05 2023

Keywords

Crossrefs

Programs

  • Mathematica
    With[{m = 100}, -(-1)^Range[m] * Accumulate[Array[(-1)^(# + 1) * MoebiusMu[#]^2 &, m]]] (* Amiram Eldar, Mar 05 2024 *)
  • 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

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