%I #18 Apr 06 2020 06:19:59
%S 1,3,6,9,11,14,17,19,22,25,28,30,33,36,38,41,44,47,49,52,55,57,60,63,
%T 66,68,71,74,76,79,82,85,87,90,93,96,98,101,104,106,109,112,115,117,
%U 120,123,125,128,131,134,136,139,142,144,147,150,153,155,158,161,163,166
%N a(n) = largest m with H(m) - H(n) <= 1, where H(i) = Sum_{j=1 to i} 1/j, the i-th harmonic number, H(0) = 0.
%H E. R. Bobo, <a href="http://www.jstor.org/stable/2687034">A sequence related to the harmonic series</a>, College Math. J. 26 (1995), 308-310.
%F a(n) = floor(e*n + (e-1)/2 + (e - 1/e)/(24*(n + 1/2))), after a suggestion by David Cantrell.
%F a(n) = A103762(n+1) - 1 = A136617(n+1) + n for n > 0. - _Jinyuan Wang_, Mar 06 2020
%e a(3) = 9 because H(9) - H(3) = 1/4 + ... + 1/9 < 1 < 1/4 + ... + 1/10 = H(10) - H(3).
%p e:= exp(1):
%p A136616 := n -> floor( e*n + (e-1)/2 + (e - 1/e)/(24*(n + 1/2))):
%p seq(A136616(n), n=0..50);
%o (PARI) default(realprecision, 10^5); e=exp(1);
%o a(n) = floor(e*n+(e-1)/2+(e-1/e)/(24*n+12)); \\ _Jinyuan Wang_, Mar 06 2020
%Y Cf. A001008, A002805, A002387, A004080, A079353, A096618, A115515, A014537, A055980, A103762, A136617.
%K nonn,easy
%O 0,2
%A _Rainer Rosenthal_, Jan 13 2008
%E Definition corrected by David W. Cantrell, Apr 14 2008
|