22. N3 (BUL) ${ }^{\mathrm{MO} 2}$ Determine all pairs $(a, b)$ of positive integers such that
$$
\frac{a^{2}}{2 a b^{2}-b^{3}+1}
$$
is a positive integer.
22. Let $a$ and $b$ be positive integers for which $\frac{a^{2}}{2 a b^{2}-b^{\pi}+1}=k$ is a positive integer. Since $k>0$, it follows that $2 a b^{2} \geq b^{3}$, so $2 a \geq b$. If $2 a>b$, then from $2 a b^{2}-b^{3}+1>0$ we see that $a^{2}>b^{2}(2 a-b)+1>b^{2}$, i.e. $a>b$. Therefore, if $a \leq b$, then $a=b / 2$.
We can rewrite the given equation as a quadratic equation in $a, a^{2}$ $2 k b^{2} a+k\left(b^{3}-1\right)=0$, which has two solutions, say $a_{1}$ and $a_{2}$, one of which is in $N_{0}$. From $a_{1}+a_{2}=2 k b^{2}$ and $a_{1} \alpha_{2}=k\left(b^{3}-1\right)$ it follows that the other solution is also in $\mathrm{N}_{0}$. Suppose w.l.o.g. that $a_{1} \geq a_{2}$. Then $a_{1} \geq k b^{2}$ and
$$
0 \leq a_{2}=\frac{k\left(b^{3}-1\right)}{a_{1}} \leq \frac{k\left(b^{3}-1\right)}{k b^{2}}<b .
$$

By the above considerations we have either $a_{2}=0$ or $a_{2}=b / 2$. If $a_{2}=0$, then $b^{3}-1=0$ and hence $a_{1}=2 k, b=1$. If $a_{2}=b / 2$, then $b=2 t$ for some $t$, and $k=b^{2} / 4, a_{1}=b^{4} / 2-b / 2$. Therefore the only solutions are
$$
(a, b) \in\left\{(2 t, 1),(t, 2 t),\left(8 t^{4}-t, 2 t\right) \mid t \in \mathbb{N}\right\} .
$$

It is easy to show that all of these pairs satisfy the given condition.