login
a(n) = Sum_{p|n, p prime} p * lcm(p,n/p).
0

%I #8 Mar 23 2023 07:36:32

%S 0,4,9,4,25,30,49,8,9,70,121,48,169,126,120,16,289,54,361,120,210,286,

%T 529,96,25,390,27,224,841,300,961,32,462,646,420,72,1369,798,624,240,

%U 1681,504,1849,528,270,1150,2209,192,49,150,1020,728,2809,162,880,448,1254,1798,3481

%N a(n) = Sum_{p|n, p prime} p * lcm(p,n/p).

%C If p is prime, a(p) = Sum_{p|p} p * lcm(p,p/p) = p * p = p^2.

%H <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>

%e a(18) = Sum_{p|18} p * lcm(p,18/p) = 2*lcm(2,9) + 3*lcm(3,6) = 2*18 + 3*6 = 54.

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

%Y Cf. A008472, A345266, A345302.

%K nonn

%O 1,2

%A _Wesley Ivan Hurt_, Jun 13 2021