9. find all pairs $(a, b)$ of natural numbers such that

$$
\frac{a^{3}+1}{2 a b^{2}+1}
$$

is an integer.
## 1st solution

According to the condition, $2 a b^{2}+1$ is a divisor of $a^{3}+1$, i.e. also of $a^{2}\left(2 a b^{2}+1\right)-$ $2 b^{2}\left(a^{3}+1\right)=a^{2}-2 b^{2}$. Furthermore, $2 b^{2} \leq a^{2}$, otherwise the denominator would be greater than the numerator. The case $2 b^{2}=a^{2}$ is not possible, otherwise 2 would be a square number. Consequently, $a^{2}-2 b^{2}>0$ and the following must apply

$$
2 a b^{2}+1 \leq a^{2}-2 b^{2} \quad \Longleftrightarrow \quad 2 b^{2}(a+1) \leq(a-1)(a+1) \quad \Longleftrightarrow \quad 2 b^{2} \leq a-1
$$

Furthermore, $2 a b^{2}+1$ is also a divisor of $a\left(2 a b^{2}+1\right)-2 b^{2}\left(a^{2}-2 b^{2}\right)=a+4 b^{4}$. Consequently, the following also applies

$$
2 a b^{2}+1 \leq a+4 b^{4} \quad \Longleftrightarrow \quad a\left(2 b^{2}-1\right) \leq\left(2 b^{2}+1\right)\left(2 b^{2}-1\right) \quad \Longleftrightarrow \quad a \leq 2 b^{2}+1
$$

Both estimates together result in the equation $a=2 b^{2}+1$, so the pairs we are looking for are all of the form $(a, b)=\left(2 n^{2}+1, n\right)$ with $n \in \mathbb{N}$. Inserting shows that they are really solutions:

$$
\frac{a^{3}+1}{2 a b^{2}+1}=\frac{a^{3}+1}{a(a-1)+1}=a+1=2 n^{2}+1
$$