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 A363993 #20 Sep 08 2023 07:09:02 %S A363993 3,10,18,25,32,40,47,54,62,69,77,84,91,99,106,114,121,128,136,143,150, %T A363993 158,165,173,180,187,195,202,210,217,224,232,239,247,254,261,269,276, %U A363993 283,291,298,306,313,320,328,335,343,350,357,365,372,380,387,394,402 %N A363993 a(n) = greatest integer k such that 1/n + 1/(n + 1) +...+ 1/k < 2. %C A363993 In general, if r > 0 and n > 1, then a(n) is the number k such that h(k) <= r + h(n-1) < h(k+1), where h(m) = m-th harmonic number. Since h(n) is approximately g + log(n+1/2), where g = Euler-Mascheroni constant (A001620), it is easy to prove that a(n) or a(n)-1 is the number floor[n*e^r-(1+e^r)/2]. Thus, the difference sequence of (a(n)) has at most two distinct numbers. For r = 2, the two numbers are 7 and 8. %e A363993 a(2) = 10 because 1/2 + 1/3 +...+ 1/10 < 2 < 1/2 + 1/3 +...+ 1/11. %t A363993 r = 2; h[n_] := HarmonicNumber[n]; %t A363993 a[n_] : = Select[Range[500], h[#] <= r + h[n - 1] < h[# + 1] & ] %t A363993 Flatten[Table[a[n], {n, 1, 70}]] %o A363993 (Python) %o A363993 from itertools import accumulate, count %o A363993 from fractions import Fraction %o A363993 def A363993(n): return next(x[0]+n-1 for x in enumerate(accumulate(Fraction(1,k) for k in count(n))) if x[1] >= 2) # _Chai Wah Wu_, Sep 07 2023 %o A363993 (PARI) a(n) = my(k=0); while (sum(i=n, n+k, 1/i) < 2, k++); n+k-1; \\ _Michel Marcus_, Sep 08 2023 %Y A363993 Cf. A001620, A136616, A364609. %K A363993 nonn %O A363993 1,1 %A A363993 _Clark Kimberling_, Sep 06 2023