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.

A366983 a(n) = Sum_{k=1..n} (k+1) * floor(n/k).

Original entry on oeis.org

2, 7, 13, 23, 31, 47, 57, 76, 92, 114, 128, 162, 178, 206, 234, 270, 290, 335, 357, 405, 441, 481, 507, 575, 609, 655, 699, 761, 793, 873, 907, 976, 1028, 1086, 1138, 1238, 1278, 1342, 1402, 1500, 1544, 1648, 1694, 1784, 1868, 1944, 1994, 2128, 2188, 2287, 2363, 2467
Offset: 1

Views

Author

Seiichi Manyama, Oct 30 2023

Keywords

Crossrefs

Partial sums of A007503.

Programs

  • PARI
    a(n) = sum(k=1, n, (k+1)*(n\k));
    
  • Python
    from math import isqrt
    def A366983(n): return -(s:=isqrt(n))*(s*(s+4)+5)+sum(((q:=n//w)+1)*(q+(w<<1)+4) for w in range(1,s+1))>>1 # Chai Wah Wu, Oct 31 2023

Formula

a(n) = A006218(n) + A024916(n).
G.f.: 1/(1-x) * Sum_{k>0} (1/(1-x^k)^2 - 1) = 1/(1-x) * Sum_{k>0} (k+1) * x^k/(1-x^k).
a(n) = A257644(n) - 1. - Hugo Pfoertner, Oct 31 2023