%I #21 Jan 25 2024 08:00:46
%S 1,4,6,9,10,24,14,20,19,40,22,54,26,56,60,41,34,76,38,90,84,88,46,120,
%T 51,104,60,126,58,240,62,84,132,136,140,171,74,152,156,200,82,336,86,
%U 198,190,184,94,246,99,204,204,234,106,240,220,280,228,232,118,540
%N a(n) = Sum_{d|n} lcm(d, n/d) / gcd(d, n/d).
%H Antti Karttunen, <a href="/A332618/b332618.txt">Table of n, a(n) for n = 1..20000</a>
%H <a href="/index/Ga#gcd">Index entries for sequences related to gcd's</a>.
%H <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>.
%F a(n) = n * Sum_{d|n} 1 / gcd(d, n/d)^2.
%F Multiplicative with a(p^e) = (2*p^(e+2) - p^2 - 1)/(p^2 - 1) if e is even, a(p^e) = 2*(p^(e+2) - p)/(p^2 - 1) if e is odd. - _Sebastian Karlsson_, May 07 2022
%F From _Peter Bala_, Jan 24 2024: (Start)
%F a(n) = Sum_{d divides n} A007913(d)*n/d.
%F Dirichlet g.f.: zeta(2*s)*zeta(s-1)^2/zeta(2*s-2). (End)
%p a:= n-> n*add(1/igcd(d, n/d)^2, d=numtheory[divisors](n)):
%p seq(a(n), n=1..80); # _Alois P. Heinz_, Feb 17 2020
%t Table[Sum[LCM[d, n/d]/GCD[d, n/d], {d, Divisors[n]}], {n, 1, 60}]
%t f[p_, e_] := If[EvenQ[e], (2*p^(e+2) - p^2 - 1)/(p^2 - 1), 2*(p^(e+2) - p)/(p^2 - 1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Dec 05 2022 *)
%o (PARI) A332618(n) = sumdiv(n,d,lcm(d,n/d)/gcd(d,n/d)); \\ _Antti Karttunen_, Nov 12 2021
%Y Cf. A007913, A055155, A056789, A057670, A332619, A337180.
%K nonn,mult
%O 1,2
%A _Ilya Gutkovskiy_, Feb 17 2020