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.

A305152 Expansion of Sum_{k>0} x^(k^2) / (1 + x^k).

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, May 26 2018

Keywords

Crossrefs

Cf. A038548, A048272, A193773 (odd bisection), A348608, A228441, A010052, A348952.

Programs

  • PARI
    {a(n) = polcoeff(sum(k=1, sqrtint(n), x^(k^2)/(1+x^k))+x*O(x^n), n)}
    
  • PARI
    a(n) = sumdiv(n, d, if (d <= sqrtint(n), (-1)^(d + n/d))); \\ Michel Marcus, Nov 03 2021

Formula

a(n) = Sum_{d|n, d <= sqrt(n)} (-1)^(d + n/d). - Ilya Gutkovskiy, Nov 02 2021
a(n) = (A228441(n) + A010052(n))/2. - Ridouane Oudra, Aug 14 2025
a(n) = A010052(n) - A348952(n). - Ridouane Oudra, Aug 20 2025