Let L=limn→∞xn. Since xn=max{an,an+1,an+2}, for every n, an≤xn, an+1≤xn, an+2≤xn.
Let ε>0. Since xn→L, there exists N1 such that for all n≥N1, ∣xn−L∣<ε/2, i.e., L−ε/2<xn<L+ε/2.
Also, since yn=an+1−an→0, there exists N2 such that for all n≥N2, ∣an+1−an∣<ε/4.
Let N=max{N1,N2}. For n≥N, an,an+1,an+2≤xn<L+ε/2.
We claim that an→L.
First, we show that limsupan≤L.
Suppose not. Then there exists a subsequence ank→L′>L. But then for large k, ank>L+ε for some ε>0. But xnk≥ank>L+ε, contradicting xnk→L.
So limsupan≤L.
Now, we show that liminfan≥L.
Suppose not. Then there exists a subsequence amk→L′′<L. For k large, amk<L−ε for some ε>0.
But amk+1=amk+ymk, amk+2=amk+1+ymk+1=amk+ymk+ymk+1.
Since yn→0, for large k, ∣ymk∣<ε/4, ∣ymk+1∣<ε/4.
So amk+1<L−ε+ε/4=L−3ε/4,
amk+2<L−ε+ε/4+ε/4=L−ε/2.
Therefore, xmk=max{amk,amk+1,amk+2}<L−ε/2, contradicting xmk→L.
Therefore, liminfan≥L.
Thus, an→L.