find all $m,n\in\mathbb{N}$ so that $\large\frac{n^3+1}{mn-1}$ $\in$ $\mathbb{N}$
my attempt :
I) if $(m=n)$ :$$n^2-1|n^3+1=(n+1)(n^2-n+1)\Longrightarrow n-1|n+1\Longrightarrow n-1|1$$ so the only answer in this case is $(m=n=2)$
II) if $(m\not=n)$ :
suppose that $(m>n\ge2)$ and $\big(\large\frac{n^3+1}{mn-1}$$=T\big)$ so $\big(n^3+1=(mn-1)T\big)$ now :$$n^3+1\equiv(mn-1)T\pmod n\Longrightarrow T\equiv-1\pmod n \Longrightarrow T=nq-1$$$$nq-1=\frac{n^3+1}{mn-1}$$
Let $l,m,n\in\Bbb{N}$ be such that $\frac{n^3+1}{mn-1}=l$. Then $$l(mn-1)=n^3+1,$$ and in particular $l\equiv-1\pmod{n}$, say $l=kn-1$ for some positive integer $k$. Then $$n^3+1=l(mn-1)=(kn-1)(mn-1)=kmn^2-(k+m)n+1,$$ from which it follows that the integer $n$ is a root of the quadratic $$X^2-kmX+(k+m)=0.$$ This means the discriminant is a perfect square, i.e. $$d^2=(-km)^2-4(k+m)=k^2m^2-4k-4m.$$ We see that $d\equiv km\pmod{2}$, and because $k$ and $m$ are positive integers we see that $d<km$ and so $$k^2m^2-4k-4m=d^2\leq(km-2)^2=k^2m^2-4km+4,$$ from which it follows that $$4km-4k-4m-4\leq0,$$ or equivalently $$(k-1)(m-1)\leq2.$$ We see that either $k=1$ or $m=1$ or else $k=m=2$ or $\{k,m\}=\{2,3\}$. We check these few cases:
If $m=1$ then $$l=\frac{n^3+1}{n-1}=n^2+n+1+\frac{2}{n-1},$$ which shows that $n-1$ must divide $2$, yielding the pairs $(m,n)=(1,2)$ and $(m,n)=(1,3)$.
Similarly, if $k=1$ then $l=n-1$ and so $$mn-1=\frac{n^3+1}{n-1}=n^2+n+1+\frac{2}{n-1},$$ which shows that again $n-1$ must divides $2$, yielding the pairs $(m,n)=(5,2)$ and $(m,n)=(5,3)$.
If $k=m=2$ then $n$ is a root of $$X^2-4X+4=0,$$ and so $n=2$, yielding the pair $(m,n)=(2,2)$.
If $\{k,m\}=\{2,3\}$ then $n$ is a root of $$X^2-6X+5=0,$$ and so $n=1$ or $n=5$, yielding the pairs $(m,n)=(2,1)$ and $(m,n)=(3,1)$, and $(m,n)=(2,5)$ and $(m,n)=(3,5)$.