A079353 Numbers n such that the best rational approximation to H(n) with denominator <=n is an integer, where H(n) denotes the n-th harmonic number (A001008/A002805).
1, 3, 4, 10, 11, 30, 31, 82, 83, 226, 227, 615, 616, 1673, 1674, 4549, 4550, 12366, 12367, 33616, 33617
Offset: 1
Examples
H(11)=83711/27720 and the best approximation to H(11) among the fractions of form k/11, k>=0, is 33/11=3, an integer. Hence 11 is in the sequence.
Crossrefs
Programs
-
Mathematica
okQ[n_] := Select[Convergents[N[HarmonicNumber[n], 30], 10], Denominator[#] <= n &][[-1]] // IntegerQ; Reap[For[n = 1, n <= 40000, n++, If[okQ[n], Print[n]; Sow[n]]]][[2, 1]] // Quiet (* Jean-François Alcover, Apr 10 2019 *)
Extensions
a(16)-a(17) from Ray Chandler, May 20 2014
Edited by N. J. A. Sloane, May 29 2014
a(18)-a(21) from Jean-François Alcover, Apr 10 2019
Comments