What is the $n$th element of this sequence:
$$S_n = S_{n-1} + (c_1 - S_{n-1})c_2$$
where $c_1$ and $c_2$ are constants and $S_1=0$.
Thank you,
What is the $n$th element of this sequence:
$$S_n = S_{n-1} + (c_1 - S_{n-1})c_2$$
where $c_1$ and $c_2$ are constants and $S_1=0$.
Thank you,
On
Think of it as $$S_n+(c_2-1)S_{n-1}=c_1c_2$$ If $c_2\ne0$, then one solution is $S_n=A$, a constant, so $$A(1+c_2-1)=c_2A=c_1c_2$$ So $S_n=c_1$ is a solution. Then let $T_n=S_n-c_1$, so $$T_n+c_1+(c_2-1)(T_{n-1}+c_1)=T_n+(c_2-1)T_{n-1}+c_1c_2=c_1c_2$$ $$T_n=(1-c_2)T_{n-1}=\frac{(1-c_2)^n}{(1-c_2)^{n-1}}T_{n-1}$$ $$\frac{T_n}{(1-c_2)^n}=\frac{T_{n-1}}{(1-c_2)^{n-1}}=\frac{T_1}{(1-c_2)^1}=\frac{S_1-c_1}{1-c_2}=\frac{-c_1}{1-c_2}$$ Then $$S_n=T_n+c_1=c_1-(1-c_2)^{n-1}c_1$$ If $c_2=0$, then the equation reads $S_n=S_{n-1}=S_1=0$.
Suppose the sequence is given by $\{a_n\}$.
$$S_n = S_{n-1} + (c_1 - S_{n-1})c_2$$ $$S_n - S_{n-1} = (c_1 - S_{n-1})c_2$$ $$a_n = (c_1 - S_{n-1})c_2$$ $$c_2S_{n-1} = c_1c_2-a_n$$ $$S_{n-1} = c_1-\frac{1}{c_2}a_n$$
See if this helps.