OFFSET
1,4
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Laszlo Toth, Weighted gcd-sum functions, J. Integer Sequences, 14 (2011), Article 11.7.7
MATHEMATICA
Table[Sum[(-1)^(k-1) LCM[k, n], {k, n}], {n, 50}] (* Harvey P. Dale, Jan 30 2024 *)
PROG
(Sage)
def A199806(n) : return add((-1)^(k-1)*lcm(k, n) for k in (1..n))
[A199806(n) for n in (1..50)] # Peter Luschny, Nov 10 2011
(PARI) a(n)=-sum(k=1, n, (-1)^k*lcm(k, n)) \\ Charles R Greathouse IV, Nov 10 2011
(Magma) [&+[(-1)^(k-1)*Lcm(k, n):k in [1..n]]: n in [1..50]]; // Marius A. Burtea, Oct 02 2019
CROSSREFS
KEYWORD
sign
AUTHOR
Laszlo Toth, Nov 10 2011
STATUS
approved