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.

A372626 a(1) = 1; a(n) = Sum_{d|n, d <= sqrt(n)} (-1)^(n/d + 1) * a(d).

Original entry on oeis.org

1, -1, 1, 0, 1, -2, 1, 0, 2, -2, 1, -1, 1, -2, 2, 0, 1, -3, 1, 0, 2, -2, 1, -1, 2, -2, 2, 0, 1, -4, 1, 0, 2, -2, 2, 1, 1, -2, 2, -1, 1, -5, 1, 0, 3, -2, 1, 1, 2, -3, 2, 0, 1, -5, 2, -1, 2, -2, 1, 0, 1, -2, 3, 0, 2, -5, 1, 0, 2, -4, 1, 1, 1, -2, 3, 0, 2, -5, 1, -1
Offset: 1

Views

Author

Ilya Gutkovskiy, May 07 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = DivisorSum[n, (-1)^(n/# + 1) a[#] &, # <= Sqrt[n] &]; Table[a[n], {n, 80}]
  • PARI
    a(n) = if (n==1, 1, sumdiv(n, d, if (d^2 <= n, (-1)^(n/d+1)*a(d)))); \\ Michel Marcus, May 09 2024

Formula

G.f.: Sum_{k>=1} (-1)^(k + 1) * a(k) * x^(k^2) / (1 + x^k).