This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A199806 #30 Jan 30 2024 17:49:09 %S A199806 1,0,0,8,-5,18,-14,80,-9,100,-44,204,-65,294,30,672,-119,540,-152, %T A199806 1040,63,1210,-230,1752,-75,2028,-54,2996,-377,2190,-434,5440,165, %U A199806 4624,280,5472,-629,6498,234,8800,-779,6300,-860,12188,225,11638,-1034,14256,-245,13000 %N A199806 Alternating LCM-sum: a(n) = Sum_{k=1..n} (-1)^(k-1)*lcm(k,n). %H A199806 Amiram Eldar, <a href="/A199806/b199806.txt">Table of n, a(n) for n = 1..10000</a> %H A199806 Laszlo Toth, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL14/Toth/toth9.html">Weighted gcd-sum functions</a>, J. Integer Sequences, 14 (2011), Article 11.7.7 %t A199806 Table[Sum[(-1)^(k-1) LCM[k,n],{k,n}],{n,50}] (* _Harvey P. Dale_, Jan 30 2024 *) %o A199806 (Sage) %o A199806 def A199806(n) : return add((-1)^(k-1)*lcm(k,n) for k in (1..n)) %o A199806 [A199806(n) for n in (1..50)] # _Peter Luschny_, Nov 10 2011 %o A199806 (PARI) a(n)=-sum(k=1,n,(-1)^k*lcm(k,n)) \\ _Charles R Greathouse IV_, Nov 10 2011 %o A199806 (Magma) [&+[(-1)^(k-1)*Lcm(k,n):k in [1..n]]: n in [1..50]]; // _Marius A. Burtea_, Oct 02 2019 %Y A199806 Cf. A051193, A199084. %K A199806 sign %O A199806 1,4 %A A199806 _Laszlo Toth_, Nov 10 2011