login
Minimal number of terms in the series 1/n + 1/(n+1) + 1/(n+2) + ... to obtain a sum >= 1.
1

%I #9 May 09 2021 17:41:07

%S 1,3,5,7,8,10,12,13,15,17,19,20,22,24,25,27,29,31,32,34,36,37,39,41,

%T 43,44,46,48,49,51,53,55,56,58,60,62,63,65,67,68,70,72,74,75,77,79,80,

%U 82,84,86,87,89,91,92,94,96,98,99,101,103,104,106,108,110

%N Minimal number of terms in the series 1/n + 1/(n+1) + 1/(n+2) + ... to obtain a sum >= 1.

%H T. D. Noe, <a href="/A213908/b213908.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A103762(n) - n + 1. - _T. D. Noe_, Jun 26 2012

%e a(3)=5 because 1/3 + 1/4 + 1/5 + 1/6 < 1 (4 terms), but 1/3 + 1/4 + 1/5 + 1/6 + 1/7 >= 1 (5 terms).

%t i = 0; s = 0; Table[While[s < 1, i++; s = s + 1/i]; s = s - 1/n; i - n + 1, {n, 100}] (* _T. D. Noe_, Jun 26 2012 *)

%t With[{nn=100},Table[Position[Accumulate[1/Range[n,2 nn]],_?(#>=1&),1,1],{n,nn}]]//Flatten (* _Harvey P. Dale_, May 09 2021 *)

%K nonn

%O 1,2

%A _Franz Vrabec_, Jun 24 2012