login
A136616
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.
8
1, 3, 6, 9, 11, 14, 17, 19, 22, 25, 28, 30, 33, 36, 38, 41, 44, 47, 49, 52, 55, 57, 60, 63, 66, 68, 71, 74, 76, 79, 82, 85, 87, 90, 93, 96, 98, 101, 104, 106, 109, 112, 115, 117, 120, 123, 125, 128, 131, 134, 136, 139, 142, 144, 147, 150, 153, 155, 158, 161, 163, 166
OFFSET
0,2
LINKS
E. R. Bobo, A sequence related to the harmonic series, College Math. J. 26 (1995), 308-310.
FORMULA
a(n) = floor(e*n + (e-1)/2 + (e - 1/e)/(24*(n + 1/2))), after a suggestion by David Cantrell.
a(n) = A103762(n+1) - 1 = A136617(n+1) + n for n > 0. - Jinyuan Wang, Mar 06 2020
EXAMPLE
a(3) = 9 because H(9) - H(3) = 1/4 + ... + 1/9 < 1 < 1/4 + ... + 1/10 = H(10) - H(3).
MAPLE
e:= exp(1):
A136616 := n -> floor( e*n + (e-1)/2 + (e - 1/e)/(24*(n + 1/2))):
seq(A136616(n), n=0..50);
PROG
(PARI) default(realprecision, 10^5); e=exp(1);
a(n) = floor(e*n+(e-1)/2+(e-1/e)/(24*n+12)); \\ Jinyuan Wang, Mar 06 2020
KEYWORD
nonn,easy
AUTHOR
Rainer Rosenthal, Jan 13 2008
EXTENSIONS
Definition corrected by David W. Cantrell, Apr 14 2008
STATUS
approved