%I #24 Nov 18 2022 07:11:00
%S 1,3,4,9,6,12,8,21,19,18,12,36,14,24,24,53,18,57,20,54,32,36,24,84,51,
%T 42,64,72,30,72,32,117,48,54,48,171,38,60,56,126,42,96,44,108,114,72,
%U 48,212,99,153,72,126,54,192,72,168,80,90,60,216,62,96,152,277,84,144
%N a(n) = Sum_{d|n} d * gcd(d,n/d).
%C If p is prime, a(n) = Sum_{d|p} d * gcd(d,p/d) = 1*1 + p*1 = p + 1. - _Wesley Ivan Hurt_, May 21 2021
%H Antti Karttunen, <a href="/A337180/b337180.txt">Table of n, a(n) for n = 1..20000</a>
%F Multiplicative with a(p^e) = (p^(2*floor(e/2)+2)-1)/(p^2-1) + p^e*ceiling(e/2). - _Sebastian Karlsson_, Nov 11 2021
%F Sum_{k=1..n} a(k) ~ c * n^2, where c = (5*zeta(4))/(4*zeta(3)) = 1.1254908... . - _Amiram Eldar_, Nov 18 2022
%t Table[Sum[k*GCD[k, n/k] (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
%t (* Second program: *)
%t Table[DivisorSum[n, # GCD[#, n/#] &], {n, 100}] (* _Michael De Vlieger_, Nov 11 2021 *)
%o (PARI) a(n) = sumdiv(n, d, d*gcd(d, n/d)); \\ _Michel Marcus_, Jan 29 2021
%Y Cf. A002117, A013662, A055155.
%K nonn,mult
%O 1,2
%A _Wesley Ivan Hurt_, Jan 28 2021