It is evident that all terms of the sequence are positive. Find a4. Since a1=1, a2=2, a3=3, we have
a4=a1a3a2+7=13.(1)
By condition,
an+1=an−2anan−1+7=[7=anan−3−an−1an−2]==an−2anan−1+anan−3−an−1an−2=anan−2an−1+an−3−an−1,n≥4.(2)
If we prove that all numbers an−2an−1+an−3, n≥4, are integers, then we obtain
that all numbers an, n≥5, are integers, since the numbers a1,a2,a3,a4 are integers. Let bn=(an−1+an−3)/an−2, n≥4. In particular
b4=a2a3+a1=23+1=2andb5=a3a4+a2=313+2=5.(3)
Show that the sequence (bn), n≥4, is periodic with 2 as its period, i.e. bn=bn−2 for all n≥6. From definition of the sequences (bn) and (an) it follows that
bn=an−2an−1+an−3=an−2an−4an−2an−3+7+an−3==an−4an−2an−2an−3+7+an−3an−4=[7=an−2an−5−an−3an−4]==an−4an−2an−2an−3+(an−2an−5−an−3an−4)+an−3an−4==an−4an−2an−2an−3+an−2an−5=an−4an−3+an−5=bn−2,n≥6.
Therefore, taking into account (3), we have b2k=b4=2 and b2k+1=b5=5 for all k=2,3,…. Since (see (2)) an+1=anbn−an−1 for all n≥4, and all numbers bn, n≥4, and numbers a1,a2,a3,a4 are integers, it follows that all terms of the sequence (an) are integers.