login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A024917 a(n) = Sum_{k=2..n} k*floor(n/k). 4
2, 5, 11, 16, 27, 34, 48, 60, 77, 88, 115, 128, 151, 174, 204, 221, 259, 278, 319, 350, 385, 408, 467, 497, 538, 577, 632, 661, 732, 763, 825, 872, 925, 972, 1062, 1099, 1158, 1213, 1302, 1343, 1438, 1481, 1564, 1641, 1712, 1759, 1882, 1938, 2030, 2101, 2198, 2251 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
FORMULA
G.f.: (1/(1 - x)) * Sum_{k>=2} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Sep 02 2019
MATHEMATICA
Table[Sum[k*Floor[n/k], {k, 2, n}], {n, 2, 60}] (* Harvey P. Dale, Mar 13 2015 *)
PROG
(Magma) [&+[k*Floor(n/k): k in [2..n]]: n in [2..55]]; // Bruno Berselli, Jan 08 2012
(PARI) a(n) = sum(k=2, n, k*floor(n/k)); \\ Michel Marcus, Sep 02 2019
(Python)
from math import isqrt
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
CROSSREFS
Sequence in context: A080156 A082083 A287558 * A081402 A281023 A359399
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 04:29 EDT 2024. Contains 371782 sequences. (Running on oeis4.)