22. N4 (BUL) Find all positive integers $a$ and $b$ for which
$$
\left[\frac{a^{2}}{b}\right]+\left[\frac{b^{2}}{a}\right]=\left[\frac{a^{2}+b^{2}}{a b}\right]+a b
$$
where as usual, $[t]$ refers to greatest integer that is less than or equal to $t$.
22. Let $a, b \in \mathbb{N}$ satisfy the given equation. It is not possible that $a=b$ (since it leads to $a^{2}+2=2 a$ ), so we assume w.l.o.g. that $a>b$. Next, for $a>b=1$ the equation becomes $a^{2}=2 a$, and one obtains a solution $(a, b)=(2,1)$.
Let $b>1$. If $\left[\frac{a^{2}}{b}\right]=\alpha$ and $\left[\frac{b^{2}}{a}\right]=\beta$, then we trivially have $a b \geq$ $\alpha \beta$. Since also $\frac{a^{2}+b^{2}}{a \delta} \geq 2$, we obtain $\alpha+\beta \geq \alpha \beta+2$, or equivalently
$(\alpha-1)(\beta-1) \leq-1$. But $\alpha \geq 1$, and therefore $\beta=0$. It follows that $a>b^{2}$, i.e., $a=b^{2}+c$ for some $c>0$. Now the given equation becomes $b^{3}+2 b c+\left[\frac{c^{2}}{b}\right]=\left[\frac{b^{4}+2 b^{2}+b^{2}+c^{2}}{b^{2}+b_{c}}\right]+b^{3}+b c$, which reduces to
$$
(c-1) b+\left[\frac{c^{2}}{b}\right]=\left[\frac{b^{2}(c+1)+c^{2}}{b^{3}+b c}\right] .
$$

If $c=1$, then (1) always holds, since both sides are 0 . We obtain a family of solutions $(a, b)=\left(n, n^{2}+1\right)$ or $(a, b)=\left(n^{2}+1, n\right)$. Note that the solution $(1,2)$ found earlier is obtained for $n=1$.
If $c>1$, then (1) implies that $\frac{b^{2}(c+1)+c^{2}}{b^{3}+b c} \geq(c-1) b$. This simplifies to
$$
c^{2}\left(b^{2}-1\right)+b^{2}\left(c\left(b^{2}-2\right)-\left(b^{2}+1\right)\right) \leq 0 .
$$

Since $c \geq 2$ and $b^{2}-2 \geq 0$, the only possibility is $b=2$. But then (2) becomes $3 c^{2}+8 c-20 \leq 0$, which does not hold for $c \geq 2$.
Hence the only solutions are $\left(\mathrm{n}, n^{2}+1\right)$ and $\left(n^{2}+1, n\right), n \in \mathbb{N}$.