The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A338798 a(n) = Sum_{k=1..n-1} lcm(lcm(n, k), lcm(n, n-k)). 1
 0, 2, 12, 28, 100, 90, 392, 408, 792, 810, 2420, 1356, 4732, 3346, 4560, 6320, 13872, 7506, 21660, 12140, 18900, 21802, 46552, 22008, 53000, 43290, 61668, 49980, 117740, 48450, 153760, 100192, 123552, 129506, 169260, 111420, 312132, 203642, 245544, 195640 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Sebastian Karlsson, Table of n, a(n) for n = 1..10000 FORMULA a(n) = n*Sum_{k=1..n-1} k*(n-k)/gcd(n,k)^2. a(n) = (1/6)*n*Sum_{d|n} d*(d*phi(d) - A023900(d)). a(p^e) = (1/6)*p^(e+1)*(p^e-1)*(p^(e+1) + p^(2*e+1) + p^2 + 2*p + 1)/(p^2 + p + 1). a(prime(n)) = A138421(n). - Michel Marcus, Jan 20 2021 MATHEMATICA a[n_] := Sum[LCM[LCM[n, k], LCM[n, n - k]], {k, 1, n - 1}]; Table[a[n], {n, 1, 40}] (* Robert P. P. McKone, Jan 18 2021 *) PROG (Python) from math import gcd for n in range(1, 41):     print(n*sum([k*(n-k)//(gcd(n, k)**2) for k in range(1, n)]), end=', ') (PARI) a(n) = sum(k=1, n-1, lcm(lcm(n, k), lcm(n, n-k))); \\ Michel Marcus, Jan 18 2021 CROSSREFS Cf. A000010, A006580, A023900, A051193, A057661, A138421. Sequence in context: A225291 A211623 A034318 * A345694 A326517 A248119 Adjacent sequences:  A338795 A338796 A338797 * A338799 A338800 A338801 KEYWORD nonn AUTHOR Sebastian Karlsson, Jan 18 2021 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 21 04:46 EDT 2022. Contains 353887 sequences. (Running on oeis4.)