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.
%I A024917 #23 Feb 18 2024 02:03:53 %S A024917 2,5,11,16,27,34,48,60,77,88,115,128,151,174,204,221,259,278,319,350, %T A024917 385,408,467,497,538,577,632,661,732,763,825,872,925,972,1062,1099, %U A024917 1158,1213,1302,1343,1438,1481,1564,1641,1712,1759,1882,1938,2030,2101,2198,2251 %N A024917 a(n) = Sum_{k=2..n} k*floor(n/k). %F A024917 G.f.: (1/(1 - x)) * Sum_{k>=2} k*x^k/(1 - x^k). - _Ilya Gutkovskiy_, Sep 02 2019 %t A024917 Table[Sum[k*Floor[n/k],{k,2,n}],{n,2,60}] (* _Harvey P. Dale_, Mar 13 2015 *) %o A024917 (Magma) [&+[k*Floor(n/k): k in [2..n]]: n in [2..55]]; // _Bruno Berselli_, Jan 08 2012 %o A024917 (PARI) a(n) = sum(k=2,n, k*floor(n/k)); \\ _Michel Marcus_, Sep 02 2019 %o A024917 (Python) %o A024917 from math import isqrt %o A024917 def A024917(n): return (-(s:=isqrt(n))**2*(s+1)+sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1))>>1)-n # _Chai Wah Wu_, Oct 23 2023 %Y A024917 Cf. A002541, A024916, A345682. %K A024917 nonn %O A024917 2,1 %A A024917 _Clark Kimberling_