A343803 a(n) = Sum_{k=1..n} k * (number of divisors of n <= k).
1, 5, 9, 23, 20, 65, 35, 109, 96, 164, 77, 377, 104, 307, 362, 525, 170, 818, 209, 1008, 690, 725, 299, 2005, 665, 1000, 1122, 1939, 464, 3106, 527, 2517, 1658, 1682, 1894, 5084, 740, 2089, 2298, 5500, 902, 6022, 989, 4701, 5066, 3035, 1175, 10117, 2478, 6069, 3890, 6532, 1484
Offset: 1
Keywords
Examples
a(4) = 1*(1) + 2*(2) + 3*(2) + 4*(3) = 23, i.e., (1 times the number of divisors of 4 that are less than or equal to 1) + (2 times the number of divisors of 4 that are less than or equal to 2) + (3 times the number of divisors of 4 that are less than or equal to 3) + (4 times the number of divisors of 4 that are less than or equal to 4).
Crossrefs
Cf. A081307.
Programs
-
Mathematica
Table[Sum[Sum[k (1 - Ceiling[n/i] + Floor[n/i]), {i, k}], {k, n}], {n, 60}]
-
PARI
a(n) = my(d=divisors(n)); sum(k=1, n, k*#select(x->(x<=k), d)); \\ Michel Marcus, Apr 30 2021
Formula
a(n) = Sum_{k=1..n} Sum_{i=1..k} k * (1 - ceiling(n/i) + floor(n/i)).
Comments