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 A006580 M3336 #49 Apr 28 2023 08:16:56 %S A006580 0,0,1,4,8,20,21,56,60,96,105,220,152,364,301,360,464,816,549,1140, %T A006580 760,1036,1221,2024,1196,2200,2041,2484,2184,4060,2205,4960,3664,4224, %U A006580 4641,5180,4008,8436,6517,7072,5980,11480,6321,13244,8888,9540,11661,17296 %N A006580 a(n) = Sum_{k=1..n-1} lcm(k,n-k). %D A006580 _Marc LeBrun_, personal communication. %D A006580 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006580 Alois P. Heinz, <a href="/A006580/b006580.txt">Table of n, a(n) for n = 0..10000</a> (first 1000 terms from Reinhard Zumkeller) %H A006580 Marc Le Brun, <a href="/A006577/a006577.pdf">Email to N. J. A. Sloane, Jul 1991</a>. %F A006580 For n > 0, a(n) = (n/6)*Sum_{d|n} (d*phi(d) - A023900(d)). - _Sebastian Karlsson_, Oct 02 2021 %F A006580 a(n) = (n/6) * (A057660(n) - A130054(n)), for n > 0. - _Amiram Eldar_, Apr 28 2023 %p A006580 a:= n-> add(ilcm(j, n-j), j=0..n): %p A006580 seq(a(n), n=0..70); # _Alois P. Heinz_, Aug 25 2019 %t A006580 Table[ Sum[ LCM[ k, n-k ], {k, 1, n-1} ], {n, 2, 50} ] (* _Olivier Gérard_, Aug 15 1997 *) %t A006580 f1[p_, e_] := (p^(2*e + 1) + 1)/(p + 1); f2[p_, e_] := 1 - (p - 1)*e; a[n_] := (Times @@ f1 @@@ (fct = FactorInteger[n]) - Times @@ f2 @@@ fct)*n/6; a[0] = 0; Array[a, 100, 0] (* _Amiram Eldar_, Apr 28 2023 *) %o A006580 (Haskell) %o A006580 a006580 n = a006580_list !! (n-1) %o A006580 a006580_list = map sum a003990_tabl %o A006580 -- _Reinhard Zumkeller_, Aug 05 2012 %o A006580 (PARI) a(n) = sum(k=1, n-1, lcm(k, n-k)); \\ _Michel Marcus_, Aug 11 2017 %Y A006580 Antidiagonal sums of array A003990. %Y A006580 Cf. A209295. %Y A006580 Cf. A000010, A023900, A057660, A130054. %K A006580 nonn %O A006580 0,4 %A A006580 _N. J. A. Sloane_ %E A006580 More terms from _Olivier Gérard_, Aug 15 1997