# Convergent Sequence, mean of previous three numbers

I am given three real numbers $x_0, x_1, x_2$ and the next number in the sequence is defined as the mean of the three real numbers. So: $$x_a=\tfrac{1}{3} \cdot (x_{a-3} + x_{a-2} + x_{a-1})$$

I am just getting started with learning about converging sequences and wanted to find out how to proof that this sequence is converging and if possible to what value given $x_0, x_1$ and $x_2$

Call the weights of the first three terms $a,b,c$ in $x_n$ as $a_n,b_n,c_n$ We can see that $(a_1,a_2,a_3)=(1,0,0),(b_1,b_2,b_3)=(0,1,0),(c_1,c_2,c_3)=(0,0,1)$: $$a_{n+3}=\frac{a_{n+2}+a_{n+1}+a_n}{3}$$ Let's call the roots of $3x^3=x^2+x+1$ as $1,\alpha,\beta$. Now, solving the linear system in $k_{a_1},k_{a_2},k_{a_3}$: $$k_{a_1}+k_{a_2}\alpha^1,k_{a_3}\beta^1=a_1=1$$ $$k_{a_1}+k_{a_2}\alpha^2,k_{a_3}\beta^2=a_2=0$$ $$k_{a_1}+k_{a_2}\alpha^3,k_{a_3}\beta^3=a_3=0$$ This allows us to write $a_n=k_{a_1}+k_{a_2}\alpha^n,k_{a_3}\beta^n$. Taking $\lim_{n\to +\infty} a_n$ is then easy by noting that $|\alpha|,|\beta|<1$, and we get: $$\lim_{n\to +\infty}a_n=\lim_{n\to +\infty}k_{a_1}+k_{a_2}\alpha^n,k_{a_3}\beta^n=k_{a_1}=\frac16$$ Simlarly $$\lim_{n\to +\infty}b_n=\frac13$$ $$\lim_{n\to +\infty}c_n=\frac12$$ So in fact, our limit converges to: $$\lim_{n\to \infty} x_n=\frac{a+2b+3c}{6}=\frac{x_1+2x_2+3x_3}{6}$$ Which is such a nice result that it begs for a nicer proof.

• I think this nicer proof can be obtained by noticing that if p, q and r are three consecutive terms in the sequence then p + 2q + 3r is an invariant. – Wonder Jul 11 '14 at 18:03
• @Wonder I think you are right! $p+2q+3r=a+2b+3c$ everywhere, which should be straightforward to prove. Supposing the sequence converges gives $x+2x+3x=a+2b+3c$ and the result follows. Nice way of seeing the problem! – chubakueno Jul 11 '14 at 18:16
• Moreover, your method allows us tu prove that the sequence $\{x_n\}$ consisting of the arithmetic mean of the previous $n$ numbers converges to $$\frac{2\sum^n_{k=1}kx_k}{n(n+1)}$$ – chubakueno Jul 11 '14 at 18:28

Hint

$$\min(x_{a-3}, x_{a-2}, x_{a-1}) \leq x_a \leq \max(x_{a-3}, x_{a-2}, x_{a-1})$$

Since $x_a$ is the mean. (Equality only for $x_0 = x_1 = x_2$ for which convergence is trivial.)

If you have $3$ terms $x_n,x_{n-1},x_{n-2}$ then you have

$$x_{n+1} = (1/3)x_n + (1/3)x_{n-1} + (1/3)x_{n-2}$$

Let $A$ be the maximum pairwise difference among the three terms $x_n,x_{n-1},x_{n-2}$. Then for example,

$$|x_{n+1} - x_{n-1}| = |(1/3)x_n - (2/3)x_{n-1} + (1/3)x_{n-2}| \leq (2/3)A$$

and similarly you can show that $|x_{n+1} - x_n| \leq (2/3)A$ as well.Thus the magnitude of the difference between any two terms $x_m,x_n$ with $m,n \geq N$ is less than or equal to a geometric series that tends to zero as $N \to \infty$, so your sequence is Cauchy and thus convergent. The sequence converges to some limit $a_0x_0 + a_1x_1 + a_2x_2$ where the $a_i$ are fixed constants. You can solve for them by noting that $a_i = \lim_{n \to \infty} a_{i,n}$ where $a_{i,n} = (1/3)a_{i,n-1} + (1/3) a_{i,n-2} + (1/3) a_{i,n-3}$ and for example you have the starting conditions $a_{1,0} = 1, a_{1,1} = 0, a_{1,2} = 0$. The general form for the solution is $a_{i,n} = A_1c_1^n + A_2c_2^n + A_3c_3^n$ where the $c_j$ are solutions to the polynomial $c^3 - (1/3)c^2 - (1/3)c - 1/3 = 0$ and the $A_j$ are coefficients you solve for by using the initial values $a_{i,0},a_{i,1},a_{i,2}$. Note $c_1 = 1$ is a solution to the polynomial equation, and you will have that the other two solutions $c_2$ and $c_3$ are complex conjugates that have magnitude less than $1$. Thus when you take the limit $n \to \infty$ to solve for $a_i$, you will get $a_i = A_1$, the coefficient of the root $c_1 = 1$.