A341117 a(n) = Sum_{i+j>=m+1} d_i * d_j, where d_1 < ... < d_m are the divisors of n.
1, 8, 15, 44, 35, 129, 63, 208, 162, 305, 143, 712, 195, 553, 550, 912, 323, 1431, 399, 1665, 994, 1265, 575, 3356, 950, 1729, 1566, 3017, 899, 4901, 1023, 3840, 2266, 2873, 2254, 7845, 1443, 3553, 3094, 7744, 1763, 8862, 1935, 6897, 5901, 5129, 2303, 14672, 3234, 8475, 5134, 9425, 2915, 13986
Offset: 1
Keywords
Examples
The divisors of 6 are 1,2,3,6, so a(6) = 6*(1+2+3+6)+3*(2+3+6)+2*(3+6)+1*6 = 129.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(n) local D, S,i; D:= sort(convert(numtheory:-divisors(n),list),`>`); S:= ListTools:-PartialSums(D); add(D[i]*S[-i],i=1..nops(D)) end proc: map(f, [$1..100]);
-
Mathematica
Array[Sum[#1[[k]]*Sum[#1[[j]], {j, #2 - k + 1, #2}], {k, #2}] & @@ {Divisors[#], DivisorSigma[0, #]} &, 54] (* Michael De Vlieger, Feb 05 2021 *)
-
PARI
a(n) = my(d=divisors(n)); sum(k=1, #d, d[k]*sum(i=#d-k+1, #d, d[i])); \\ Michel Marcus, Feb 05 2021
Comments