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.

A356249 a(n) = Sum_{k=1..n} (k * floor(n/k))^3.

Original entry on oeis.org

1, 16, 62, 219, 405, 1053, 1523, 2948, 4407, 7041, 8703, 15283, 17949, 24657, 32685, 44806, 50536, 70687, 78573, 105411, 125879, 149879, 163565, 222425, 247476, 286134, 327634, 396258, 423084, 532236, 564818, 664763, 738095, 821693, 904937, 1107618, 1162268, 1277588, 1395760
Offset: 1

Views

Author

Seiichi Manyama, Jul 31 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(k * Floor[n/k])^3, {k, 1, n}]; Array[a, 40] (* Amiram Eldar, Jul 31 2022 *)
  • PARI
    a(n) = sum(k=1, n, (k*(n\k))^3);
    
  • PARI
    a(n) = sum(k=1, n, k^3*sumdiv(k, d, 1-(1-1/d)^3));
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, (k^3-(k-1)^3)*x^k*(1+4*x^k+x^(2*k))/(1-x^k)^4)/(1-x))
    
  • Python
    from math import isqrt
    def A356249(n): return -(s:=isqrt(n))**5*(s+1)**2 + sum((q:=n//k)**2*(k*(3*(k-1))+q*(k*(k*(4*k+6)-6)+q*(k*(3*(k-1))+1)+2)+1) for k in range(1,s+1))>>2 # Chai Wah Wu, Oct 21 2023

Formula

a(n) = Sum_{k=1..n} k^3 * Sum_{d|k} (1 - (1 - 1/d)^3).
G.f.: (1/(1 - x)) * Sum_{k>=1} (k^3 - (k - 1)^3) * x^k * (1 + 4*x^k + x^(2*k))/(1 - x^k)^4.
From Vaclav Kotesovec, Aug 02 2022: (Start)
a(n) = A064603(n) - 3*A356125(n) + 3*A319086(n).
a(n) ~ n^4 * (Pi^2/8 + Pi^4/360 - 3*zeta(3)/4). (End)