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-1 of 1 results.

A332623 a(n) = Sum_{k=1..n} ceiling(n/k)^2.

Original entry on oeis.org

1, 5, 14, 25, 43, 58, 87, 106, 141, 171, 212, 239, 302, 333, 386, 439, 507, 546, 631, 674, 765, 834, 911, 962, 1091, 1157, 1246, 1331, 1450, 1513, 1666, 1733, 1866, 1967, 2080, 2181, 2373, 2452, 2577, 2694, 2883, 2970, 3171, 3262, 3437, 3600, 3749, 3848, 4107, 4225
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 17 2020

Keywords

Crossrefs

Programs

  • Magma
    [&+[Ceiling(n/k)^2:k in [1..n]]:n in [1..50]]; // Marius A. Burtea, Feb 17 2020
    
  • Mathematica
    Table[Sum[Ceiling[n/k]^2, {k, 1, n}], {n, 1, 50}]
    Table[n + Sum[2 DivisorSigma[1, k] + DivisorSigma[0, k], {k, 1, n - 1}], {n, 1, 50}]
    nmax = 50; CoefficientList[Series[x/(1 - x)^2 + x/(1 - x) Sum[(2 k + 1) x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
  • Python
    from math import isqrt
    def A332623(n): return n-(s:=isqrt(n-1))**2*(s+2)+sum((q:=(n-1)//k)*((k<<1)+q+3) for k in range(1,s+1)) # Chai Wah Wu, Oct 24 2023

Formula

G.f.: x/(1 - x)^2 + (x/(1 - x)) * Sum_{k>=1} (2*k + 1) * x^k / (1 - x^k).
a(n) = n + Sum_{k=1..n-1} (2*sigma(k) + d(k)).
a(n) ~ n^2 * Pi^2 / 6. - Vaclav Kotesovec, Feb 20 2020
Showing 1-1 of 1 results.