Every sequence satisfying given conditions is determined by first two terms. Thus we are looking for integer pairs (a1,a2), for which all the other terms are integers. Writing out the formula for several small values of n and multiplying it we obtain
a3(a2+1)a4(a3+1)a5(a4+1)=a1+2006,=a2+2006,=a3+2006,
Subtracting adjacent equalities (to remove number 2006) and rearranging gives
a3−a1a4−a2a5−a3=(a3+1)(a4−a2),=(a4+1)(a5−a3),=(a5+1)(a6−a4),(1)
All the terms (an+1) are nonzero by definition. Hence two possibilities can happen. If a3−a1=0, by substituting into previous we get (step by step) a4−a2=0, a5−a3=0, ..., i.e.
a1=a3=a5=…anda2=a4=a6=…(2)
On the other side, if a3−a1=0, by the same substituting we obtain a4−a2=0, a5−a3=0, ... First have a look at the second case. By (1) we have
0<∣an+3−an+1∣=∣an+2−an∣⋅∣an+2+1∣1≤∣an+2−an∣(3)
for all n≥1. Thus we have non-increasing sequence of positive integers
∣a3−a1∣≥∣a4−a2∣≥∣a5−a3∣≥…
Obviously this sequence is constant after some term (otherwise we could select infinite decreasing subsequence of positive integers, which is anyway impossible). Thus there is some index N and value d with ∣an+2−an∣=d for all n≥N. By (3) then ∣an+2+1∣=1, i.e. for n≥N+2 we have an∈{0,−2}. But by definition
aN+4=aN+3+1aN+2+2006,
hence aN+4 is one of the values
0+10+2006=2006,−2+10+2006=−2006,0+1−2+2006=2004,−2+1−2+2006=−2004.
This is in contrary with aN+4∈{0,−2}. In this case there is no sequence satisfying given conditions. Therefore every such sequence satisfies (2). Substituting n=1 and a3=a1 in definition we get
a1=a2+1a1+2006ora1a2=2006=2⋅17⋅59.
Considering a1,a2=−1 we obtain
a1∈{1,±2,±17,±34,±59,±118,±1003,2006}anda2=a12006.
It can be easily verified every such sequence a1,a2,a3,a4,a5,… satisfies given condition. The number of sequences is 14.