This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A289183 #63 Feb 16 2025 08:33:48 %S A289183 3,10,21,35,53,74,99,128,160,196,235,277,324,374,427,484,545,609,676, %T A289183 748,822,901,983,1068,1157,1250,1346,1446,1549,1656,1766,1880,1998, %U A289183 2119,2244,2372,2504,2639,2778,2921,3067,3216,3369,3526,3686,3850,4018,4189 %N A289183 a(n) is the greatest m such that 2*H(n) > H(m), where H(n) is the n-th harmonic number. %H A289183 Jon E. Schoenfield, <a href="/A289183/b289183.txt">Table of n, a(n) for n = 1..10000</a> %H A289183 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HarmonicNumber.html">Harmonic Number</a> %F A289183 From _Jon E. Schoenfield_, Jul 13 2017: (Start) %F A289183 It seems that, for the vast majority of values of n > 1, f(n) = floor(n^2 * exp(gamma + 1/n) - C), where gamma is the Euler-Mascheroni constant (A001620) and C = 1/2 + (1/6)*exp(gamma) = 0.7968454029983663308727506838511965915282742..., is equal to a(n); f(n) = a(n) for all n in [2..10000] except n=66: f(66)=7876, but a(66)=7875. [Thanks to _Vaclav Kotesovec_ for identifying the value of C.] %F A289183 Is there any n > 66 at which f(n) and a(n) differ? %F A289183 (End) %F A289183 From _Vaclav Kotesovec_, Jul 17 2017: (Start) %F A289183 f(39087) = 2721180603, but a(39087) = 2721180602; %F A289183 f(517345) = 476697560917, but a(517345) = 476697560916; %F A289183 f(2013005) = 7217245877275, but a(2013005) = 7217245877274; %F A289183 No other such numbers below 10000000. %F A289183 (End) %F A289183 After 2013005, the only other numbers n < 4*10^9 at which f(n) and a(n) differ are 10240491 and 80968833. - _Jon E. Schoenfield_, Aug 05 2017 %t A289183 s = HarmonicNumber@ Range[10^4]; Table[Position[s, k_ /; k < 2 HarmonicNumber@ n][[-1, 1]], {n, 48}] (* _Michael De Vlieger_, Jun 27 2017 *) %t A289183 (* The following program searches for such n that f(n) <> a(n) *) %t A289183 f[n_] := Floor[n^2*E^(EulerGamma + 1/n) - (1/2 + (1/6)*E^(EulerGamma))]; %t A289183 harmonic[n_] := Log[n] + EulerGamma + 1/(2 n) - Sum[BernoulliB[2 k]/(2 k*n^(2 k)), {k, 1, 10}]; %t A289183 Select[Range[100000], 2*harmonic[#] < harmonic[f[#]] &] %t A289183 (* _Vaclav Kotesovec_, Jul 17 2017 *) %o A289183 (PARI) a(n) = {my(m=1); hn = sum(k=1, n, 1/k); hm = 1; until(hm > 2*hn, m++; hm+=1/m); m--;} \\ _Michel Marcus_, Jul 19 2017 %o A289183 (Python) %o A289183 from sympy import harmonic %o A289183 def a(n): %o A289183 hn2 = 2 * harmonic(n) %o A289183 m = n %o A289183 while harmonic(m) <= hn2: m += 1 %o A289183 return m - 1 %o A289183 print([a(n) for n in range(1, 49)]) # _Michael S. Branicky_, Mar 10 2021 %Y A289183 Cf. A000217, A002387, A002805, A092315. %K A289183 nonn %O A289183 1,1 %A A289183 _Joseph Wheat_, Jun 27 2017 %E A289183 More terms from _Michael De Vlieger_, Jun 27 2017