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.

A345034 a(n) = Sum_{k=1..n} (-2)^(floor(n/k) - 1).

Original entry on oeis.org

1, -1, 6, -8, 17, -27, 70, -136, 255, -491, 1046, -2082, 4063, -8131, 16476, -32882, 65423, -130845, 262372, -524818, 1048149, -2096045, 4195412, -8390820, 16775029, -33550477, 67113210, -134225588, 268427597, -536854983, 1073757754, -2147517076
Offset: 1

Views

Author

Seiichi Manyama, Jun 06 2021

Keywords

Crossrefs

Column k=2 of A345033.

Programs

  • Mathematica
    a[n_] := Sum[(-2)^(Floor[n/k] - 1), {k, 1, n}]; Array[a, 30] (* Amiram Eldar, Jun 06 2021 *)
  • PARI
    a(n) = sum(k=1, n, (-2)^(n\k-1));
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, x^k*(1-x^k)/(1+2*x^k))/(1-x))

Formula

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