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.

A332490 a(n) = Sum_{k=1..n} k * ceiling(n/k).

This page as a plain text file.
%I A332490 #29 Oct 22 2023 16:37:08
%S A332490 1,4,10,18,30,42,61,77,101,124,153,177,218,246,285,325,373,409,467,
%T A332490 507,570,624,683,731,816,873,942,1010,1095,1155,1258,1322,1418,1500,
%U A332490 1589,1673,1801,1877,1976,2072,2203,2287,2426,2514,2643,2767,2886,2982,3155,3262
%N A332490 a(n) = Sum_{k=1..n} k * ceiling(n/k).
%F A332490 G.f.: x/(1 - x)^3 + (x/(1 - x)) * Sum_{k>=1} x^k / (1 - x^k)^2.
%F A332490 a(n) = n*(n + 1)/2 + Sum_{k=1..n-1} sigma(k).
%F A332490 a(n) ~ (6 + Pi^2)*n^2/12. - _Vaclav Kotesovec_, Mar 10 2020
%t A332490 Table[Sum[k Ceiling[n/k], {k, 1, n}], {n, 1, 50}]
%t A332490 Table[n (n + 1)/2 + Sum[DivisorSigma[1, k], {k, 1, n - 1}], {n, 1, 50}]
%t A332490 nmax = 50; CoefficientList[Series[x/(1 - x)^3 + (x/(1 - x)) Sum[x^k/(1 - x^k)^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest
%o A332490 (Magma) [&+[k*Ceiling(n/k):k in [1..n]]:n in [1..50]]; // _Marius A. Burtea_, Feb 16 2020
%o A332490 (PARI) a(n) = sum(k=1, n, k*ceil(n/k)); \\ _Michel Marcus_, Feb 17 2020
%o A332490 (Python)
%o A332490 from math import isqrt
%o A332490 def A332490(n): return n*(n+1)-(s:=isqrt(n-1))**2*(s+1)+sum((q:=(n-1)//k)*((k<<1)+q+1) for k in range(1,s+1))>>1 # _Chai Wah Wu_, Oct 22 2023
%Y A332490 Cf. A000203, A000217, A006590, A024916.
%K A332490 nonn
%O A332490 1,2
%A A332490 _Ilya Gutkovskiy_, Feb 16 2020