8. Find all non-negative integers $a$ and $b$ that satisfy the equation

$$
a^{2}+b^{2}=841 \cdot(a b+1)
$$
Solution. Let the pair of numbers $(a, b)$ satisfy the equation of the problem:

$$
a^{2}+b^{2}=k^{2}(a b+1), k=29
$$

Suppose one of the numbers, for example $a$, is zero. Then, obviously, $b=k$. Therefore, we will further consider such solutions ( $a, b$ ) of the equation (1), for which

$$
a \neq 0, b \neq 0
$$

Moreover, we will assume that

$$
a \leq b
$$

So, let the pair ( $a_{0}, b_{0}$ ) satisfy (1), as well as conditions (2), (3). From (1) we find that $b_{0}^{2}$ $k^{2} a_{0} b_{0}+a_{0}^{2}-k^{2}=0$. This equality can be interpreted as a quadratic equation in the unknown $b_{0}$. By Vieta's theorem, in addition to $b_{0}$ itself, this equation has another root $b_{0}^{\prime}$ such that

$$
\begin{aligned}
& b_{0}+b_{0}^{\prime}=k^{2} a_{0} \\
& b_{0} b_{0}^{\prime}=a_{0}^{2}-k^{2}
\end{aligned}
$$

Claim. This new root $b_{0}^{\prime}$ satisfies the conditions: $b_{0}^{\prime} \geq 0, b_{0}^{\prime} \in \mathbb{Z}$ and $b_{0}^{\prime}0$ ). From (4) it follows that the non-negative $b_{0}^{\prime}$ is an integer, and from (5) - that $b_{0}^{\prime}=\frac{a_{0}^{2}-k^{2}}{b_{0}}$. We will establish that $b_{0}^{\prime}a_{m-1}$ (see claim)

Immediately note the formulas for the inverse transformation

$$
a_{m-1}=b_{m}, b_{m-1}=k^{2} b_{m}-a_{m},
$$

with which the chain (6) can be extended to the left. Using the rule (7), from one solution $\left(a_{0}, b_{0}\right)$, satisfying (1), (2), (3), we can obtain only a finite number of new solutions of the equation (1), since, according to the proven claim, $a_{0}>a_{1}>a_{2}>$ $\cdots \geq 0$. This means that at some step, $a_{n}=0$ will necessarily be obtained (then, as shown above, $b_{n}=k$ ). To get 0 on the $n$-th step, $a_{n-1}=k$ must have been on the previous step (substituting $a=a_{n-1}=k$ into (1), we find $b=b_{n-1}=k^{3}$ ). Thus, the end of the chain (6) looks like this:

$$
\ldots \rightarrow\left(a_{n-1}, b_{n-1}\right)=\left(k, k^{3}\right) \rightarrow\left(a_{n}, b_{n}\right)=(0, k)
$$

(There is no point in continuing the chain (8) to the right, since further $(0, k) \rightarrow(-k, 0) \rightarrow(0, k) \rightarrow \cdots$.$) A$ nd what precedes the pair $\left(a_{n-1}, b_{n-1}\right)=\left(k, k^{3}\right)$? According to (7'), on the previous step $a_{n-2}=k^{3}, \quad b_{n-2}=k^{5}-k-$ and this is also a solution of the equation (1)! We can continue, obtaining new solutions: $a_{n-2}=k^{5}-k, b_{n-2}=k^{7}-2 k^{3}$ and so on. This means that the equation (1) has infinitely many solutions, since the chain (8) can be extended to the left indefinitely.

Let's explain why (8) contains all solutions (1) satisfying condition (3). Let $\left(a^{*}, b^{*}\right)$ be some (satisfying (3)) solution of the equation (1). It was shown that using formulas (7) from the solution ( $a^{*}, b^{*}$ ) we can obtain a chain of new solutions (see (6)), which will certainly end with the solution ( $0, k$ ). But this means that ( $a^{*}, b^{*}$ ) is contained in (8), since, taking the solution $(0, k)$ as the starting point, we can return to $\left(a^{*}, b^{*}\right)$ using inverse transformations ( $7^{\prime}$ ) (and the chain (8) is precisely structured this way: starting from $(0, k)$, we obtain it all using ( 7 ( $\mathbf{2}$ ).

To write the answer, we will slightly change the numbering: let $\left(a_{0}, b_{0}\right)=(0, k)$ and move along the chain (8) to the left (we will have $\left(a_{1}, b_{1}\right)=\left(k, k^{3}\right),\left(a_{2}, b_{2}\right)=\left(k^{3}, k^{5}-k\right)$ and so on).

Answer: The solutions ( $a, b$ ) (under the condition $a \leq b$ ) are those and only those pairs of numbers $\left(a_{n}, b_{n}\right)$, which for each $n \in \mathbb{N}$ are calculated by the formulas: $a_{n}=b_{n-1}, b_{n}=k^{2} b_{n-1}-a_{n-1}, a_{0}=$ $0, b_{0}=k ;$ here $\quad k=29$.