11. (20 points) Given the sequence of positive integers $\left\{a_{n}\right\}$ satisfies:
$$
\begin{array}{l}
a_{1}=a, a_{2}=b, \\
a_{n+2}=\frac{a_{n}+2018}{a_{n+1}+1}(n \geqslant 1) .
\end{array}
$$

Find all possible values of $a+b$.
11. From the problem, we have
$$
\begin{array}{l}
a_{n+2} a_{n+1} + a_{n+2} = a_{n} + 2018. \\
\text { Then }\left\{\begin{array}{l}
a_{n+2} a_{n+1} = a_{n} - a_{n+2} + 2018, \\
a_{n+3} a_{n+2} = a_{n+1} - a_{n+3} + 2018
\end{array}\right. \\
\Rightarrow a_{n+2}\left(a_{n+3} - a_{n+1}\right) \\
\quad = -\left(a_{n+3} - a_{n+1}\right) + \left(a_{n+2} - a_{n}\right) \\
\Rightarrow \left(a_{n+2} + 1\right)\left(a_{n+3} - a_{n+1}\right) = a_{n+2} - a_{n} \\
\Rightarrow a_{n+3} - a_{n+1} = \frac{a_{n+2} - a_{n}}{a_{n+2} + 1}.
\end{array}
$$

Notice that, $\left\{a_{n}\right\}$ is a sequence of positive integers, and
$$
a_{n+2} + 1 > 1.
$$

Thus, $\left\{\left|a_{n+2} - a_{n}\right|\right\}$ is a strictly decreasing sequence of non-negative integers, which can only be
$$
\begin{array}{l}
\left|a_{n+2} - a_{n}\right| = 0. \\
\text { Then } a_{1} = a_{3} = a_{5} = \cdots = a, \\
a_{2} = a_{4} = a_{6} = \cdots = b,
\end{array}
$$

which implies $a = \frac{a + 2018}{b + 1}, b = \frac{b + 2018}{a + 1}$
$$
\Rightarrow a b = 2018.
$$

Therefore, $(a, b)$
$=(2018,1)$ or $(1,2018)$ or
$$
(2,1009) \text { or }(1009,2)
$$
$\Rightarrow a + b$ can be 1011 or 2019.