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.

Showing 1-2 of 2 results.

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)).

A350166 Partial sums of A050469.

Original entry on oeis.org

1, 3, 5, 9, 15, 19, 25, 33, 40, 52, 62, 70, 84, 96, 108, 124, 142, 156, 174, 198, 210, 230, 252, 268, 299, 327, 347, 371, 401, 425, 455, 487, 507, 543, 579, 607, 645, 681, 709, 757, 799, 823, 865, 905, 947, 991, 1037, 1069, 1112, 1174, 1210, 1266, 1320, 1360, 1420
Offset: 1

Views

Author

Seiichi Manyama, Dec 18 2021

Keywords

Crossrefs

Programs

  • Mathematica
    f[2, e_] := 2^e; f[p_, e_] := If[Mod[p, 4] == 1, (p^(e + 1) - 1)/(p - 1), (p^(e + 1) + (-1)^e)/(p + 1)]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; Accumulate @ Array[s, 50] (* Amiram Eldar, Dec 18 2021 *)
  • PARI
    a(n) = sum(k=1, n, sumdiv(k, d, kronecker(-4, k/d)*d));
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, k*x^k/(1+x^(2*k)))/(1-x))

Formula

a(n) = Sum_{k=1..n} Sum_{d|k} A101455(k/d) * d = Sum_{k=1..n} A050469(k).
G.f.: (1/(1 - x)) * Sum_{k>=1} k * x^k/(1 + x^(2*k)).
Showing 1-2 of 2 results.