OFFSET
1,2
COMMENTS
If the harmonic series is divided into the longest possible consecutive groups so that the sum of each group is <= 1, then a(n) is the number of terms in the n-th group. - Pablo Hueso Merino, Feb 16 2020
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..1000
FORMULA
a(1) = 1, a(n) = (max(m) : Sum_{s=r..m} 1/s <= 1)-r+1, r = Sum_{k=1..n-1} a(k). - Pablo Hueso Merino, Feb 16 2020
a(n) ~ c * exp(n), where c = (exp(1)-1) * A300897 = 0.290142809280953235916025... - Vaclav Kotesovec, Apr 05 2020
EXAMPLE
From Pablo Hueso Merino, Feb 16 2020: (Start)
a(1) = 1 because 1 <= 1, 1 is one term (if you added 1/2 the sum would be greater than 1).
a(2) = 2 because 1/2 + 1/3 = 0.8333... <= 1, 1/2 and 1/3 are two terms (if you added 1/4 the sum would be greater than one).
a(3) = 6 because 1/4 + 1/5 + 1/6 + 1/7 + 1/8 + 1/9 = 0.9956... <= 1, it is a sum of six terms. (End)
MATHEMATICA
a[1]=1;
a[n_]:= a[n]= Module[{sum = 0}, r = 1 + Sum[a[k], {k, n-1}];
x = r;
While[sum <= 1, sum += 1/x++];
p = x-2;
p -r +1];
Table[a[n], {n, 10}] (* Pablo Hueso Merino, Feb 16 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 30 2017, following a suggestion from Loren Booda
EXTENSIONS
More terms from Jinyuan Wang, Feb 20 2020
STATUS
approved