OFFSET
1,2
COMMENTS
For a given n > 0, let t(0) = 1/n and t(k) = t(k-1) + t(k-1)^2 for k > 0. Then a(n) is the smallest k such that t(k) >= 1.
For large n, the sequence of rational fractions {t(0), t(1), t(2), ...} = {1/n, 1/n + (1/n)^2, 1/n + (1/n)^2 + (1/n + (1/n)^2)^2, ...} begins growing slightly faster than the linear-growth sequence {1/n, 1/n + 1/n^2, 1/n + 2/n^2, 1/n + 3/n^2, ...}, which would reach 2/n in n steps; {t(0), t(1), t(2), ...} reaches nearly 2/n in n/2 steps, then nearly doubles again to 4/n in the next n/4 steps, etc., so reaching 1 requires a little more than n/2 + n/4 + n/8 + ... = n steps.
For the smallest k such that a(n) - k = n, see A340825.
Truncating the expansion given in the Formula section to just ceiling(n + log(n) + c0) gives the correct value of a(n) except at certain values of n at which log(n) + c0 is slightly less than an integer, namely, n = 10, 206, 1524, 11261, 30611, 226188, 614843, 33569293, 91250800, 674257283, 1832821321, 4982124892, 5463563356246, 14851504989918, 40370576139364, ..., where it instead gives a(n) - 1.
Conjecture: a(n) = ceiling(n + log(n) + c0 + (1/2)/n) for all n > 1.
FORMULA
EXAMPLE
a(1)=0 since the starting value 1/n = 1/1 = 1 is already at 1.
a(2)=2 since we have t(0) = 1/2, t(1) = 1/2 + (1/2)^2 = 3/4, and t(2) = 3/4 + (3/4)^2 = 21/16 > 1.
a(4)=5 since we have t(0) = 1/4 = 0.25, t(1) = 0.3125, t(2) = 0.4101..., t(3) = 0.5783..., t(4) = 0.9129..., t(5) = 1.7463... > 1.
a(28)=31 since we have t(0) = 1/28 = 0.0357..., t(1) = 0.0369..., ..., t(30) = 0.9884..., t(31) = 1.9655... > 1.
PROG
(PARI) a(n) = {my(t=1./n, k=0); while(t < 1, t += t^2; k++; ); k; } \\ Michel Marcus, Jan 19 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon E. Schoenfield, Jan 18 2021
STATUS
approved