Solution:
By cancellation of terms we see that
an+1−xan=yn+1 and an+1−yan=xn+1
In particular, an+2−xan+1=yn+2=y⋅yn+1=y(an+1−xan), which we can write as
an+2=(x+y)an+1−xyan.
We let s=x+y and t=xy. Then the four given integral values of an yield a pair of linear equations in s and t (or, to be precise, s and −t ):
am+2=sam+1−tamam+3=sam+2−tam+1
If the determinant am+12−am+2am is nonzero, these equations have a unique solution. In fact,
am+12−am+2am=am+1(am+1−xam)−am(am+2−xam+1)=am+1ym+1−amym+2=ym+1(am+1−yam)=xm+1ym+1=tm+1
So we distinguish two cases.
Case 1. t=0. Then without loss of generality y=0, so an=xn. The conclusion follows from the following lemma:
Lemma 1. If x is a real number and n a nonnegative integer such that xn and xn+1 are integers, then x is an integer.
Proof. Note that x=xn+1/xn is rational (if x=0, the conclusion is immediate). Write x=p/q in lowest terms with q>0; then xn=pn/qn is also in lowest terms, hence q=1.
Case 2. t=0. Then tm+1 is an integer, and likewise tm+2=am+22−am+3am+1 is an integer. So by Lemma 1 again, t is an integer. Now s is rational by Cramer's rule applied to (7). If we can prove s is an integer, then since a0=1 and a1=s, we will be done by 6 .
Write s=u/v in lowest terms and assume that v>1. Every an is rational; write an=un/vn in lowest terms. We claim that vn=vn for every n≥0. The cases n=0 and n=1 are clear. We now induct, using (6):
vn+2un+2=vu⋅vn+1un+1−t⋅vnun=vn+2uun+1−tv2un
Since u and un+1 are coprime to v, the last fraction is reduced. So vn+2=vn+2 as desired. Hence an∈/Z for n≥1, which is a contradiction.