login
Denominator of Sum_{j=1..n} d(j)/n, where d = number of divisors function (A000005).
3

%I #15 Oct 08 2021 23:56:40

%S 1,2,3,1,1,3,7,2,9,10,11,12,13,14,1,8,17,9,19,10,3,11,23,2,25,2,27,28,

%T 29,10,31,32,11,34,35,9,37,19,13,20,41,1,43,1,45,23,1,8,49,50,51,52,

%U 53,54,5,56,19,58,59,20,61,62,3,8,65,33,67,17,69,35,71

%N Denominator 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="/A059247/b059247.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = denominator(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 Denominator[Table[Sum[DivisorSigma[0, j]/n, {j,1,n}], {n,1,100}]] (* _G. C. Greubel_, Jan 02 2016 *)

%o (PARI) a(n) = denominator(sum(j=1, n, numdiv(j))/n); \\ _Michel Marcus_, Jan 03 2017

%o (Python)

%o from math import isqrt, gcd

%o def A059247(n): return n//gcd(n,(lambda m: 2*sum(n//k for k in range(1, m+1))-m*m)(isqrt(n))) # _Chai Wah Wu_, Oct 08 2021

%Y Cf. A006218, A059246 and also A059248/A035105.

%K nonn,frac

%O 1,2

%A _N. J. A. Sloane_, Jan 21 2001