login
a(n) = Sum_{i+j<=m+1} d_i * d_j, where d_1 < ... < d_m are the divisors of n.
3

%I #14 Feb 04 2021 20:06:52

%S 1,5,7,17,11,39,15,49,34,59,23,144,27,79,86,129,35,198,39,219,114,119,

%T 47,436,86,139,142,287,59,523,63,321,170,179,190,760,75,199,198,676,

%U 83,690,87,423,453,239,95,1184,162,474,254,491,107,846,278,896,282,299,119,2061,123,319,613,769

%N a(n) = Sum_{i+j<=m+1} d_i * d_j, where d_1 < ... < d_m are the divisors of n.

%C If p is prime, a(p^k) = k*p^(k+1)/(p-1) + ((p-2)*p^(k+1)+1)/(p-1)^2.

%C If p < q are primes, a(p*q) = 1 + 2*p + 2*q + p^2 + 4*p*q.

%H Robert Israel, <a href="/A341038/b341038.txt">Table of n, a(n) for n = 1..10000</a>

%e The divisors of 6 are 1,2,3,6, so a(6) = 1*(1+2+3+6)+2*(1+2+3)+3*(1+2)+6*1 = 39.

%p f:= proc(n) local D,S,i;

%p D:= sort(convert(numtheory:-divisors(n),list));

%p S:= ListTools:-PartialSums(D);

%p add(S[-i]*D[i],i=1..nops(D))

%p end proc:

%p map(f, [$1..100]);

%o (PARI) a(n) = my(d=divisors(n)); sum(k=1, #d, d[k]*sum(i=1, #d-k+1, d[i])); \\ _Michel Marcus_, Feb 04 2021

%Y Cf. A341039

%K nonn,look

%O 1,2

%A _J. M. Bergot_ and _Robert Israel_, Feb 03 2021