Example 8 Determine the maximum value of $m^{2}+n^{2}$, where $m, n \in\{1,2, \cdots, 2005\}$ satisfy $\left(n^{2}+2 m n-2 m^{2}\right)^{2}=1$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
Analysis We can eliminate the product term by formula, and then observe the relation to Pell's equation.
Solution $\left(n^{2}+2 m n-2 m^{2}\right)^{2}=\left[(n+m)^{2}-3 m^{2}\right]^{2}=1$, so $(n+m)^{2}-3 m^{2}= \pm 1$. Let $x=m+n$, $y=n$, then $x^{2}-3 y^{2}= \pm 1$. For $x^{2}-3 y^{2}=-1$, taking both sides modulo 3, we find the equation has no integer solutions.

Therefore, $x^{2}-3 y^{2}=1$. Its smallest positive integer solution is $x_{1}=2, y_{1}=1$, and by the theorem of Pell's equation, we get $x_{2}=7$, $y_{2}=4$. If all solutions $\left\{x_{n}, y_{n}\right\}\left(n \in \mathbf{N}^{*}\right)$, then the second-order linear recurrence relation for $\left\{x_{n}\right\}$ is $x_{n+1}=4 x_{n}-x_{n-1}$; the second-order linear recurrence relation for $\left\{y_{n}\right\}$ is $y_{n+1}=4 y_{n}-y_{n-1}$. To maximize $m^{2}+n^{2}$, we need $m, n$ to take their maximum values. From $x=m+n, y=n$, we get $m=x-y, n=y$. It is easy to see that when $x, y$ take their maximum values, $m, n$ also have their maximum values. By the recurrence relation, we calculate:
$$
y_{6}=780, y_{7}=2911>2005,
$$

Therefore,
$$
y_{6}=780, x_{6}=1086 \text { when, } m, n \text { have their maximum values, }\left\{\begin{array}{l}
m=306 \\
n=780
\end{array}\right. \text {. }
$$

In summary, when $m=306, n=780$, $m^{2}+n^{2}=702036$ is the maximum value satisfying the given conditions.
Comment Utilizing the recurrence relation of the solutions of Pell's equation is an effective method for handling such problems.