login
A051193
a(n) = Sum_{k=1..n} lcm(n,k).
11
1, 4, 12, 24, 55, 66, 154, 176, 279, 320, 616, 468, 1027, 910, 1110, 1376, 2329, 1656, 3268, 2320, 3171, 3674, 5842, 3624, 6525, 6136, 7398, 6636, 11803, 6630, 14446, 10944, 12837, 13940, 15820, 12096, 24679, 19570, 21450, 18080, 33661, 18984, 38872, 26884
OFFSET
1,2
LINKS
Akshay Bansal, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
Akshay Bansal, C Program.
Soichi Ikeda and Kaneaki Matsuoka, On the Lcm-Sum Function, Journal of Integer Sequences, Vol. 17 (2014), Article 14.1.7.
László Tóth, Weighted gcd-sum functions, J. Integer Sequences, 14 (2011), Article 11.7.7.
FORMULA
a(n) = n*(1+Sum_{d|n} d*phi(d))/2 = n*(1+A057660(n))/2 = n*A057661(n). - Vladeta Jovovic, Jun 21 2002
G.f.: x*f'(x), where f(x) = x/(2*(1 - x)) + (1/2)*Sum_{k>=1} k*phi(k)*x^k/(1 - x^k) and phi() is the Euler totient function (A000010). - Ilya Gutkovskiy, Aug 31 2017
Sum_{k=1..n} a(k) ~ 3 * zeta(3) * n^4 / (4*Pi^2). - Vaclav Kotesovec, May 29 2021
MAPLE
a:=n->add(ilcm( n, j ), j=1..n): seq(a(n), n=1..50); # Zerinvary Lajos, Nov 07 2006
MATHEMATICA
Table[Sum[LCM[k, n], {k, 1, n}], {n, 1, 39}] (* Geoffrey Critzer, Feb 16 2015 *)
f[p_, e_] := (p^(2*e + 1) + 1)/(p + 1); a[n_] := n * (1 + Times @@ f @@@ FactorInteger[n])/2; Array[a, 100] (* Amiram Eldar, Apr 26 2023 *)
PROG
(Haskell)
a051193 = sum . a051173_row -- Reinhard Zumkeller, Feb 11 2014
(PARI) a(n) = sum(k=1, n, lcm(n, k)); \\ Michel Marcus, Feb 06 2015
(Python)
from math import prod
from sympy import factorint
def A051193(n): return n*(1+prod((p**((e<<1)+1)+1)//(p+1) for p, e in factorint(n).items())>>1) # Chai Wah Wu, Aug 05 2024
CROSSREFS
Cf. A000010, A018804, A051173 (triangle whose n-th row sum is a(n)), A057660, A057661.
Sequence in context: A037338 A136486 A003203 * A356550 A216244 A215223
KEYWORD
nonn
STATUS
approved