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.

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

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Nov 04 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[-DivisorSum[n, (-1)^(# + n/#) &, # < Sqrt[n] &], {n, 1, 80}]
    nmax = 80; CoefficientList[Series[Sum[x^(k (k + 1))/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
  • PARI
    A348952(n) = -sumdiv(n,d,if((d*d)Antti Karttunen, Nov 05 2021

Formula

G.f.: Sum_{k>=1} x^(k*(k + 1)) / (1 + x^k).
For p odd prime, a(p) = a(p^2) = -1. - Bernard Schott, Nov 22 2021
a(n) = (A010052(n) - A228441(n))/2. - Ridouane Oudra, Aug 14 2025
a(n) = A010052(n) - A305152(n). - Ridouane Oudra, Aug 20 2025