6. Find all pairs of natural numbers $a$ and $b$, for which $a^{3} b-1$ is divisible by $a+1$ and $a b^{3}+1$ is divisible by $b-1$.
Answer: $a=b=2, a=b=3$ and $a=1, b=3$.

First solution. Since $a^{3} b-1$ is divisible by $a+1$, the number $b+1=$ $b\left(a^{3}+1\right)-\left(a^{3} b-1\right)$ is also divisible by $a+1$. Similarly, from the fact that $a b^{3}+1$ is divisible by $b-1$, we conclude that the number $a+1=\left(a b^{3}+1\right)-a\left(b^{3}-1\right)$ is also divisible by $b-1$. Thus, $b+1$ is divisible by $a+1$, which, in turn, is divisible by $b-1$. Therefore, $b+1$ is divisible by $b-1$ and, hence, $2=(b+1)-(b-1)$ is also divisible by $b-1$. Consequently, $b=2$ or $b=3$. In the first case, $3=b+1$ is divisible by $a+1$ and, thus, $a=2$; in the second case, $4=b+1$ is divisible by $a+1$ and, thus, $a=1$ or $a=3$. It is not difficult to verify that the answers fit.

Second solution. Since $a^{3} b-1$ is divisible by $a+1$, the number $a^{3}(b+1)=$ $\left(a^{3}+1\right)+\left(a^{3} b-1\right)$ is also divisible by $a+1$. Since the numbers $a$ and $a+1$ are coprime, $b+1$ is divisible by $a+1$. Similarly, from the fact that $a b^{3}+1$ is divisible by $b-1$, we conclude that the number $(a+1) b^{3}=\left(b^{3}-1\right)+\left(a b^{3}+1\right)$ is also divisible by $b-1$, and thus, $a+1$ is divisible by $b-1$. Thus, $b+1$ is divisible by $a+1$, which, in turn, is divisible by $b-1$. Therefore, $b+1$ is divisible by $b-1$. But then $2=(b+1)-(b-1)$ is also divisible by $b-1$ and, hence, $b=2$ or $b=3$. If $b=2$, then $3=b+1$ is divisible by $a+1$ and $a=2$. Verification shows that $a=b=2$ fits. If $b=3$, then $4=b+1$ is divisible by $a+1$ and $a=3$ or $a=1$. Verification shows that both situations are possible.

Third solution. Since $a b^{3}+1$ is divisible by $b-1$, the number $b\left(a b^{2}+1\right)=$ $(b-1)+\left(a b^{3}+1\right)$ is also divisible by $b-1$. Since the numbers $b$ and $b-1$ are coprime, $a b^{2}+1$ is divisible by $b-1$. But then $b(a b+1)=(b-1)+\left(a b^{2}+1\right)$ is also divisible by $b-1$, and thus, $a b+1$ is divisible by $b-1$. We do the same action again and get that $b(a+1)=(b-1)+(a b+1)$ is divisible by $b-1$. Therefore, $a+1$ is divisible by $b-1$.

On the other hand, from the fact that $a^{3} b-1$ is divisible by $a+1$, we conclude that the number $a\left(a^{2} b+1\right)=(a+1)+\left(a^{3} b-1\right)$ is also divisible by $a+1$, and thus, $a^{2} b+1$ is divisible by $a+1$. Therefore, $a^{2} b+1$ is divisible by $b-1$. Then $b\left(a^{2}+1\right)=(b-1)+\left(a^{2} b+1\right)$ is divisible by $b-1$. Therefore, $a^{2}+1$ is divisible by $b-1$. But then $2=\left(a^{2}+1\right)-(a-1)(a+1)$ is also divisible by $b-1$. From this, we get that $b=2$ or $b=3$. If $b=2$, then $2\left(a^{2}-1\right)+3=2 a^{2}+1=a^{2} b+1$ is divisible by $a+1$, that is, 3 is divisible by $a+1$, from which $a=2$, and this fits. If $b=3$, then $3\left(a^{2}-1\right)+4=3 a^{2}+1=a^{2} b+1$ is divisible by $a+1$, that is, 4 is divisible by $a+1$, from which $a=1$ or $a=3$, which also fits.

## Variant 4