cp's OEIS Frontend

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.

A226183 Least positive integer k such that 1 + 1/2 + ... + 1/n < 1/(n+1) + ... + 1/k.

This page as a plain text file.
%I A226183 #18 Sep 10 2021 17:35:54
%S A226183 4,11,22,36,54,75,100,129,161,197,236,278,325,375,428,485,546,610,677,
%T A226183 749,823,902,984,1069,1158,1251,1347,1447,1550,1657,1767,1881,1999,
%U A226183 2120,2245,2373,2505,2640,2779,2922,3068,3217,3370,3527,3687,3851,4019,4190
%N A226183 Least positive integer k such that 1 + 1/2 + ... + 1/n < 1/(n+1) + ... + 1/k.
%H A226183 Clark Kimberling, <a href="/A226183/b226183.txt">Table of n, a(n) for n = 1..200</a>
%F A226183 a(n) = round(exp(gamma)*n*(n+1) + gamma) where gamma is the Euler-Mascheroni constant 0.57714... (A001620). - _Carl R. White_, Sep 01 2021
%F A226183 a(n) = A226184(n) + n. - _Michel Marcus_, Sep 09 2021
%e A226183 a(3) = 22 because 1/4 + 1/5 + ... + 1/21 < 1 + 1/2 + 1/3 < 1/4 + 1/5 + ... + 1/22.
%t A226183 z = 55; f[n_] := 1/n; p[n_] := p[n] = Sum[f[k], {k, 1, n}]; Do[s = 0; a[n] = NestWhile[# + 1 &, 1, ! (s += f[#]) >= 2 p[n] &], {n, 1, z}]; m = Map[a, Range[z]]  (* A226183 *)
%t A226183 m1 = Table[m[[n]] - n, {n, 1, z}] (* A226184 *)
%Y A226183 Cf. A226184, A289183.
%K A226183 nonn
%O A226183 1,1
%A A226183 _Clark Kimberling_, May 30 2013