OFFSET
1,2
REFERENCES
M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 1999; see p. 135.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = denominator(A006218(n)/n). - Michel Marcus, Jan 03 2017
EXAMPLE
1, 3/2, 5/3, 2, 2, 7/3, 16/7, 5/2, 23/9, 27/10, ...
MATHEMATICA
Denominator[Table[Sum[DivisorSigma[0, j]/n, {j, 1, n}], {n, 1, 100}]] (* G. C. Greubel, Jan 02 2016 *)
PROG
(PARI) a(n) = denominator(sum(j=1, n, numdiv(j))/n); \\ Michel Marcus, Jan 03 2017
(Python)
from math import isqrt, gcd
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
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
N. J. A. Sloane, Jan 21 2001
STATUS
approved