10. The arithmetic sequence $\{a+n b \mid n=1,2, \cdots\}$ contains an infinite geometric sequence. Find the necessary and sufficient conditions for the real numbers $a, b(a, b \neq 0)$.
10. The necessary and sufficient condition for real numbers $a, b (a, b \neq 0)$ is $\frac{a}{b} \in \mathbf{Q}$.

Suppose there are positive integers $1 \leqslant n_{1}<n_{2}<\cdots$ such that $a+b n_{1}, a+b n_{2}, \cdots$ form a geometric sequence, then $\frac{a+b n_{1}}{a+b n_{2}}=\frac{a+b n_{2}}{a+b n_{3}}$. By the theorem of the ratio of differences, we get $\frac{a+b n_{2}}{a+b n_{3}}=\frac{\left(a+b n_{1}\right)-\left(a+b n_{2}\right)}{\left(a+b n_{2}\right)-\left(a+b n_{3}\right)}=\frac{n_{1}-n_{2}}{n_{2}-n_{3}}$. Let $k=\frac{n_{1}-n_{2}}{n_{2}-n_{3}}$, then $\frac{a+b n_{2}}{a+b n_{3}}=k$, solving for $\frac{a}{b}=$ $\frac{k n_{3}-n_{2}}{1-k} \in \mathbf{Q}$.

Conversely, when $\frac{a}{b} \in \mathbf{Q}$, from Example 9 of this chapter, part (1), we know: the arithmetic sequence $\{a+n b \mid n=1,2, \cdots, a, b \in \mathbf{Q}$, and $\left.a^{2}+b^{2} \neq 0\right\}$ contains an infinite geometric sequence, and the conclusion holds.