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.

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

Original entry on oeis.org

1, 4, 10, 17, 27, 41, 55, 70, 93, 115, 137, 167, 193, 223, 267, 298, 332, 381, 419, 465, 525, 571, 617, 679, 738, 792, 868, 930, 988, 1080, 1142, 1205, 1297, 1367, 1459, 1560, 1634, 1712, 1820, 1914, 1996, 2120, 2206, 2300, 2450, 2544, 2638, 2764, 2875, 2996, 3136, 3246
Offset: 1

Views

Author

Seiichi Manyama, Dec 16 2021

Keywords

Crossrefs

Column 2 of A350122.

Programs

  • Mathematica
    a[n_] := Sum[Floor[n/(2*k - 1)]^2, {k, 1, n}]; Array[a, 50] (* Amiram Eldar, Dec 17 2021 *)
  • PARI
    a(n) = sum(k=1, n, (n\(2*k-1))^2);
    
  • PARI
    a(n) = sum(k=1, n, sumdiv(k, d, k/d%2*(2*d-1)));
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, (2*k-1)*x^k/(1-x^(2*k)))/(1-x))

Formula

a(n) = Sum_{k=1..n} Sum_{d|k, k/d odd} 2*d - 1 = Sum_{k=1..n} 2 * A002131(k) - A001227(k) = 2 * A350146(n) - A060831(n).
G.f.: (1/(1 - x)) * Sum_{k>=1} (2*k - 1) * x^k/(1 - x^(2*k)).