OFFSET
1,2
LINKS
FORMULA
a(n) = n * Sum_{d|n} 1 / gcd(d, n/d)^2.
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
From Peter Bala, Jan 24 2024: (Start)
a(n) = Sum_{d divides n} A007913(d)*n/d.
Dirichlet g.f.: zeta(2*s)*zeta(s-1)^2/zeta(2*s-2). (End)
MAPLE
a:= n-> n*add(1/igcd(d, n/d)^2, d=numtheory[divisors](n)):
seq(a(n), n=1..80); # Alois P. Heinz, Feb 17 2020
MATHEMATICA
Table[Sum[LCM[d, n/d]/GCD[d, n/d], {d, Divisors[n]}], {n, 1, 60}]
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 *)
PROG
(PARI) A332618(n) = sumdiv(n, d, lcm(d, n/d)/gcd(d, n/d)); \\ Antti Karttunen, Nov 12 2021
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Ilya Gutkovskiy, Feb 17 2020
STATUS
approved