OFFSET
0,4
REFERENCES
Marc LeBrun, personal communication.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 1000 terms from Reinhard Zumkeller)
Marc Le Brun, Email to N. J. A. Sloane, Jul 1991.
FORMULA
For n > 0, a(n) = (n/6)*Sum_{d|n} (d*phi(d) - A023900(d)). - Sebastian Karlsson, Oct 02 2021
MAPLE
a:= n-> add(ilcm(j, n-j), j=0..n):
seq(a(n), n=0..70); # Alois P. Heinz, Aug 25 2019
MATHEMATICA
Table[ Sum[ LCM[ k, n-k ], {k, 1, n-1} ], {n, 2, 50} ] (* Olivier Gérard, Aug 15 1997 *)
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 *)
PROG
(Haskell)
a006580 n = a006580_list !! (n-1)
a006580_list = map sum a003990_tabl
-- Reinhard Zumkeller, Aug 05 2012
(PARI) a(n) = sum(k=1, n-1, lcm(k, n-k)); \\ Michel Marcus, Aug 11 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Olivier Gérard, Aug 15 1997
STATUS
approved