%I #84 Aug 24 2023 17:02:57
%S 1,2,4,6,11,11,22,22,31,32,56,39,79,65,74,86,137,92,172,116,151,167,
%T 254,151,261,236,274,237,407,221,466,342,389,410,452,336,667,515,550,
%U 452,821,452,904,611,641,761,1082,599,1051,782,956,864,1379,821,1166
%N a(n) = Sum_{k=1..n} lcm(n,k)/n.
%C Sum of numerators of n-th order Farey series (cf. A006842). - _Benoit Cloitre_, Oct 28 2002
%C Equals row sums of triangle A143613. - _Gary W. Adamson_, Aug 27 2008
%C Equals row sums of triangle A159936. - _Gary W. Adamson_, Apr 26 2009
%C Also row sums of triangle A164306. - _Reinhard Zumkeller_, Aug 12 2009
%D H. W. Gould and Temba Shonhiwa, Functions of GCD's and LCM's, Indian J. Math. (Allahabad), 39 (1997), 11-35.
%D H. W. Gould and Temba Shonhiwa, A generalization of Cesaro's function and other results, Indian J. Math. (Allahabad), 39 (1997), 183-194.
%H T. D. Noe, <a href="/A057661/b057661.txt">Table of n, a(n) for n = 1..1000</a>
%H Zachary Franco, <a href="https://doi.org/10.1080/00029890.2019.1583529">Problem 12114</a>, The American Mathematical Monthly, Vol. 126, No. 5 (2019), p. 469; <a href="https://doi.org/10.1080/00029890.2021.1840171">A Dirichlet Series with Reduced Numerators</a>, Solution to Problem 12114 by Tamas Wiandt, ibid., Vol. 128, No. 1 (2021), pp. 91-92.
%H <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>.
%F a(n) = (1+A057660(n))/2.
%F a(n) = A051193(n)/n.
%F a(n) = Sum_{d|n} psi(d), where psi(m) = is the sum of totatives of m (A023896). - _Jaroslav Krizek_, Dec 28 2016
%F a(n) = Sum_{i=1..n} denominator(n/i). - _Wesley Ivan Hurt_, Feb 26 2017
%F G.f.: x/(2*(1 - x)) + (1/2)*Sum_{k>=1} k*phi(k)*x^k/(1 - x^k), where phi() is the Euler totient function (A000010). - _Ilya Gutkovskiy_, Aug 31 2017
%F If p is prime, then a(p) = T(p-1) + 1 = p(p-1)/2 + 1, where T(n) = n(n+1)/2 is the n-th triangular number (A000217). - _David Terr_, Feb 10 2019
%F Sum_{k=1..n} a(k) ~ zeta(3) * n^3 / Pi^2. - _Vaclav Kotesovec_, May 29 2021
%F Dirichlet g.f.: zeta(s)*(1 + zeta(s-2)/zeta(s-1))/2 (Franco, 2019). - _Amiram Eldar_, Mar 26 2022
%t Table[Total[Numerator[Range[n]/n]], {n, 55}] (* _Alonso del Arte_, Oct 07 2011 *)
%t f[p_, e_] := (p^(2*e + 1) + 1)/(p + 1); a[n_] := (1 + Times @@ f @@@ FactorInteger[n])/2; Array[a, 100] (* _Amiram Eldar_, Apr 26 2023 *)
%o (Haskell)
%o a057661 n = a051193 n `div` n -- _Reinhard Zumkeller_, Jun 10 2015
%o (Magma) [&+[&+[h: h in [1..d] | GCD(h,d) eq 1]: d in Divisors(n)]: n in [1..100]]; // _Jaroslav Krizek_, Dec 28 2016
%o (PARI) a(n)=sum(k=1,n,lcm(n,k))/n \\ _Charles R Greathouse IV_, Feb 07 2017
%o (Python)
%o from math import lcm
%o def A057661(n): return sum(lcm(n,k)//n for k in range(1,n+1)) # _Chai Wah Wu_, Aug 24 2023
%Y Cf. A000010, A000217, A006842, A018804, A023896, A051193, A057660, A143613, A159936, A164306.
%Y See A341316 for another version.
%K easy,nice,nonn
%O 1,2
%A _Henry Gould_, Oct 15 2000
%E More terms from _James A. Sellers_, Oct 16 2000
|