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.

A345035 a(n) = Sum_{k=1..n} (-3)^(floor(n/k) - 1).

Original entry on oeis.org

1, -2, 11, -28, 81, -234, 739, -2216, 6545, -19594, 59139, -177408, 531181, -1593614, 4783799, -14351032, 43044597, -129133854, 387426799, -1162281332, 3486765521, -10460293354, 31381119459, -94143358440, 282429356977, -847288080362, 2541866366171
Offset: 1

Views

Author

Seiichi Manyama, Jun 06 2021

Keywords

Crossrefs

Column k=3 of A345033.

Programs

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

Formula

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