%I #11 Oct 23 2023 16:53:52
%S 1,3,5,2,2,7,16,5,23,27,29,35,37,41,3,25,52,29,60,33,10,37,76,7,87,7,
%T 95,101,103,37,113,119,41,127,131,35,142,73,50,79,160,4,170,4,182,93,
%U 4,33,201,207,211,217,219,227,21,239,81,247,249,87,263
%N Numerator of Sum_{j=1..n} d(j)/n, where d = number of divisors function (A000005).
%D M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 1999; see p. 135.
%H G. C. Greubel, <a href="/A059246/b059246.txt">Table of n, a(n) for n = 1..1000</a>
%F a(n) = numerator(A006218(n)/n). - _Michel Marcus_, Jan 03 2017
%e 1, 3/2, 5/3, 2, 2, 7/3, 16/7, 5/2, 23/9, 27/10, ...
%t Numerator[Table[Sum[DivisorSigma[0, j]/n, {j,1,n}], {n,1,100}]] (* _G. C. Greubel_, Jan 02 2017 *)
%o (PARI) a(n) = numerator(sum(j=1, n, numdiv(j))/n); \\ _Michel Marcus_, Jan 03 2017
%o (Python)
%o from math import gcd, isqrt
%o def A059246(n): return (m:=-(s:=isqrt(n))**2+(sum(n//k for k in range(1,s+1))<<1))//gcd(n,m) # _Chai Wah Wu_, Oct 23 2023
%Y Cf. A006218, A059247.
%K nonn,frac
%O 1,2
%A _N. J. A. Sloane_, Jan 21 2001