OFFSET
1,3
LINKS
FORMULA
If n odd, a(n) = (1/2) * n * Sum_{d|n} Sum_{j|d} (-1)^(j + 1) * mu(d/j) * (n + d) / j^2.
If n even, a(n) = (1/2) * n^2 * Sum_{d|n} Sum_{j|d} (-1)^(j + 1) * mu(d/j) * (n + d) / (d * j^2).
MATHEMATICA
Table[Sum[(-1)^(k + 1) LCM[n, k]/GCD[n, k], {k, 1, n}], {n, 1, 49}]
PROG
(PARI) a(n) = sum(k=1, n, (-1)^(k+1)*lcm(n, k)/gcd(n, k)); \\ Michel Marcus, Mar 24 2020
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Mar 24 2020
STATUS
approved