12.3. Subtracting the equalities $a_{n}+a_{n+1}=2 a_{n+2} a_{n+3}+1$ and $a_{n+1}+$ $a_{n+2}=2 a_{n+3} a_{n+4}+1$, we get $a_{n+2}-a_{n}=2 a_{n+3}\left(a_{n+4}-a_{n+2}\right)$. Then it follows by induction on $k$ that

$$
a_{n+2}-a_{n}=2^{k} a_{n+3} \ldots a_{n+2 k+1}\left(a_{n+2 k+2}-a_{n+2 k}\right)
$$

Hence $2^{k}$ divides $a_{n+2}-a_{n}$ for every $k$, i.e. $a_{n+2}=a_{n}$. Therefore $a_{2 n-1}=a_{1}$ and $a_{2 n}=a_{2}$ for every $n$. Now it follows from the condition of the problem that $\left(2 a_{1}-1\right)\left(2 a_{2}-1\right)=-4009$. Since $4009=19.211$ and 19 and 211 are primes, we get $2 a_{1}-1= \pm 1, \pm 19, \pm 211, \pm 4009$. Therefore there are 8 sequences with the required property.
Problem 12.3. Find the number of the sequences $\left\{a_{n}\right\}_{n=1}^{\infty}$ of integers such that

$$
a_{n}+a_{n+1}=2 a_{n+2} a_{n+3}+2005
$$

for every $n$.

Nikolai Nikolov