9. (This question is worth 16 points) Given the sequence $\left\{a_{n}\right\}: a_{1}=7, \frac{a_{n+1}}{a_{n}}=a_{n}+2, n=1,2,3, \cdots$. Find the smallest positive integer $n$ such that $a_{n}>4^{2018}$.
Given $\frac{a_{n+1}}{a_{n}}=a_{n}+2$, we know that $a_{n+1}+1=\left(a_{n}+1\right)^{2}$. Therefore,
$$
a_{n}+1=\left(a_{1}+1\right)^{2^{n-1}}=8^{2^{n-1}}=2^{3 \times 2^{n-1}},
$$

so $a_{n}=2^{3 \times 2^{n-1}}-1$.
It is clear that $\left\{a_{n}\right\}$ is monotonically increasing. Since
$$
a_{11}=2^{3072}-12^{4036}=4^{2018},
$$

the smallest value of $n$ that satisfies the condition is 12.