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 A051193 #59 Aug 05 2024 01:56:27 %S A051193 1,4,12,24,55,66,154,176,279,320,616,468,1027,910,1110,1376,2329,1656, %T A051193 3268,2320,3171,3674,5842,3624,6525,6136,7398,6636,11803,6630,14446, %U A051193 10944,12837,13940,15820,12096,24679,19570,21450,18080,33661,18984,38872,26884 %N A051193 a(n) = Sum_{k=1..n} lcm(n,k). %H A051193 Akshay Bansal, <a href="/A051193/b051193.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe) %H A051193 Akshay Bansal, <a href="/A051193/a051193.c.txt">C Program</a>. %H A051193 Soichi Ikeda and Kaneaki Matsuoka, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Ikeda/ikeda4.html">On the Lcm-Sum Function</a>, Journal of Integer Sequences, Vol. 17 (2014), Article 14.1.7. %H A051193 László Tóth, <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. %H A051193 <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>. %F A051193 a(n) = n*(1+Sum_{d|n} d*phi(d))/2 = n*(1+A057660(n))/2 = n*A057661(n). - _Vladeta Jovovic_, Jun 21 2002 %F A051193 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 %F A051193 Sum_{k=1..n} a(k) ~ 3 * zeta(3) * n^4 / (4*Pi^2). - _Vaclav Kotesovec_, May 29 2021 %p A051193 a:=n->add(ilcm( n, j ), j=1..n): seq(a(n), n=1..50); # _Zerinvary Lajos_, Nov 07 2006 %t A051193 Table[Sum[LCM[k, n], {k, 1, n}], {n, 1, 39}] (* _Geoffrey Critzer_, Feb 16 2015 *) %t A051193 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 *) %o A051193 (Haskell) %o A051193 a051193 = sum . a051173_row -- _Reinhard Zumkeller_, Feb 11 2014 %o A051193 (PARI) a(n) = sum(k=1, n, lcm(n,k)); \\ _Michel Marcus_, Feb 06 2015 %o A051193 (Python) %o A051193 from math import prod %o A051193 from sympy import factorint %o A051193 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 %Y A051193 Cf. A000010, A018804, A051173 (triangle whose n-th row sum is a(n)), A057660, A057661. %K A051193 nonn %O A051193 1,2 %A A051193 _Clark Kimberling_