Example 18 (1985 3rd American Invitational Mathematics Examination) The general term of the sequence $101,104,116, \cdots$ is $a_{n}=100+n^{2}$, where $n=1,2,3, \cdots$. For each $n$, let $d_{n}$ denote the greatest common divisor of $a_{n}$ and $a_{n+1}$. Find the maximum value of $d_{n}$, where $n$ takes all positive integers.
We can prove a more general conclusion:
If $a$ is a positive integer, and $d_{n}$ is the greatest common divisor of $a+n^{2}$ and $a+(n+1)^{2}$, then when $n=2 a$, $d_{n}$ reaches its maximum value of $4 a+1$.
Since $d_{n}$ is the greatest common divisor of $a+n^{2}$ and $a+(n+1)^{2}$, then $d_{n}\left|\left(a+n^{2}\right), d_{n}\right|\left[a+(n+1)^{2}\right]$.
Thus, $d_{n} \mid\left[a+(n+1)^{2}\right]-\left(a+n^{2}\right)$, which means $d_{n} \mid(2 n+1)$.
Also, since $2\left(a+n^{2}\right)=n(2 n+1)+(2 a-n)$, then from $d_{n}\left|\left(a+n^{2}\right), d_{n}\right|(2 n+1)$ we get $d_{n} \mid(2 a-n)$.
From (1) and (2), we know $d_{n} \mid[(2 n+1)+2(2 a-n)]$, which means $d_{n} \mid(4 a+1)$.
(2)
Therefore, $1 \leqslant d_{n} \leqslant 4 a+1$.
Next, we prove that $d_{n}$ can reach $4 a+1$.
In fact, when $n=2 a$,
$$
\begin{array}{l}
a+n^{2}=a(4 a+1), \\
a+(n+1)^{2}=(a+1)(4 a+1) .
\end{array}
$$

Since $(a, a+1)=1$, then
the greatest common divisor of $a+n^{2}$ and $a+(n+1)^{2}$ is $4 a+1$.
Therefore, the maximum value of $d_{n}$ is $4 a+1$.
In particular, when $a=100$, the maximum value of $d_{n}$ is 401.