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.

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

Original entry on oeis.org

1, 3, 6, 12, 21, 41, 74, 144, 275, 541, 1054, 2102, 4151, 8281, 16484, 32938, 65707, 131391, 262464, 524878, 1049201, 2098291, 4195444, 8390860, 16779477, 33558743, 67113306, 134226304, 268444033, 536887965, 1073758878, 2147517156, 4295001319, 8590001385, 17179936018
Offset: 1

Views

Author

Seiichi Manyama, Jun 06 2021

Keywords

Crossrefs

Column k=2 of A345032.

Programs

  • Mathematica
    a[n_] := Sum[2^(Floor[n/k] - 1), {k, 1, n}]; Array[a, 35] (* 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).