I was wondering if the following infinite sequence converges or diverges:
First in words: The next term equals the previous term plus one divided by the sum of all previous terms. The first term is equal to one.
Second as equation: $$a_n=a_{n-1}+\frac{1}{\sum_{x=0}^{n-1}a_x}$$ where $$a_0=1$$
Third as code:
$a_n=1$
$sum=1$
For i=1 to $\infty$
$a_n=a_n+1/sum$
$sum=sum+a_n$
Next i
If I expressed that correctly, the first 3 terms (starting with $a_0$) you get should be 1, 2, 2.33333
This is my first post on stack exchange; sorry if I don't have the right notation.
It diverges.
From the recursion, we can see that $a_n>a_{n-1}$, and so this is a monotonically increasing sequence and will converge if and only if it is bounded above. Suppose $M>a_n$ for all $n$. Then $$\sum_{k=0}^{n-1}a_k < Mn$$ and so $$ a_n > a_{n-1} + \frac{1}{Mn}$$ Iterating this estimate, we get that $$a_n>\frac{1}{M}\sum_{k=1}^n\frac{1}{n}$$
The right hand side is a partial sum of the harmonic series (times a constant) which is known to tend to $\infty$. Thus $a_n$ cannot be bounded above and must diverge