login
a(n) = Sum_{d|n} d * floor(n/d^2).
2

%I #9 May 17 2021 17:56:19

%S 1,2,3,6,5,8,7,12,12,14,11,21,13,20,18,28,17,32,19,34,27,32,23,46,30,

%T 38,36,46,29,58,31,56,42,50,40,80,37,56,51,73,41,80,43,74,65,68,47,

%U 105,56,84,66,90,53,104,65,103,75,86,59,136,61,92,91,120,75,125,67,118,90

%N a(n) = Sum_{d|n} d * floor(n/d^2).

%C If p is prime, a(p) = Sum_{d|p} d * floor(p/d^2) = 1*p + p*0 = p.

%e a(6) = 8; Sum_{d|6} d * floor(6/d^2) = 1*6 + 2*1 + 3*0 + 6*0 = 8.

%t Table[Sum[(1 - Ceiling[n/k] + Floor[n/k]) k*Floor[n/k^2], {k, n}], {n, 100}]

%o (PARI) a(n) = sumdiv(n, d, d*(n\d^2)); \\ _Michel Marcus_, May 17 2021

%Y Cf. A344128, A344404, A344405.

%K nonn

%O 1,2

%A _Wesley Ivan Hurt_, May 16 2021