OFFSET
1,2
COMMENTS
a(n) is equal to A024581(n) through a(10), and grows very similarly for n > 10.
Let b(n) = Sum_{j=1..n} a(n); then for n >= 2 it appears that b(n) = round((b(n-1) + 1/2)*e). Cf. A331030. - Jon E. Schoenfield, Jan 14 2020
FORMULA
a(n) = min(p): Sum_{b=r+1..p+r} 1/b >= 1, r = Sum_{k=1..n-1} a(k), a(1) = 1.
EXAMPLE
a(1)=1 because 1 >= 1,
a(2)=3 because 1/2 + 1/3 + 1/4 = 1.0833... >= 1, etc.
PROG
(Python)
x = 0.0
y = 0.0
for i in range(1, 100000000000000000000000):
y += 1
x = x + 1/i
if x >= 1:
print(y)
y = 0
x = 0
(PARI) default(realprecision, 10^5); e=exp(1);
lista(nn) = {my(r=1); print1(r); for(n=2, nn, print1(", ", -r+(r=floor(e*r+(e+1)/2+(e-1/e)/(24*(r+1/2)))))); } \\ Jinyuan Wang, Mar 31 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Alejandro Argüelles Trujillo and Pablo Hueso Merino, Jan 07 2020
EXTENSIONS
a(20)-a(21) from Giovanni Resta, Jan 14 2020
More terms from Jinyuan Wang, Mar 31 2020
STATUS
approved