Find all positive integers which are representable uniquely as $\frac{x^2+y}{xy+1}$ with $x,y$ positive integers. $\textbf{Question:}$ Find all positive integers,which are representable uniquely as
$$\frac{x^2+y}{xy+1}\,,$$
where $x$ and $y$ are positive integers.
I think this question maybe has something to do with vieta jumping.
I also found that for such $x$ and $y$ to exist $y  < x^2$ must hold.

Suppose that $k$ be a positive integer such that there exists a pair $(x,y)\in\mathbb{Z}_{>0}^2$ for which
$$\frac{x^2+y}{xy+1}=k\,.\tag{#}$$
Then, $t=x$ is a root to the quadratic polynomial
$$q(t):=t^2-(ky)t+(y-k)\,.$$
Note that $$t=ky-x=\frac{y-k}{x}$$ is also a root of $q(t)$.
If $y-k\leq 0$, then $ky-x\leq 0$ and $y\leq k$, so that $x\geq ky\geq y^2$.   Now, observe that
$$ky^2=\frac{x^2y^2+y^3}{xy+1}=xy-1+\frac{y^3+1}{xy+1}\,$$
with
$$\frac{y^3+1}{xy+1}\leq \frac{y^3+1}{y^2\cdot y+1}=1\,.$$
Since $ky^2$ is a positive integer, we must have $x=ky$ and $y=k$, implying $(x,y)=(k^2,k)$.
We now suppose that $y>k$.  The discriminant of $q(t)$ is given by
$$(ky)^2-4(y-k)=z^2\,,$$
for some nonnegitive integer $z$.  Observe that
$$(ky)^2>z^2\geq (ky-2)^2\,.$$
That is, $z^2=(ky-2)^2$ or $z^2=(ky-1)^2$.  The case $z^2=(ky-2)^2$ implies $k=1$, while the case $z^2=(ky-1)^2$ is impossible since $z^2$ must have the same  parity as $(ky)^2$.  Therefore, $k=1$ and thus,
$$q(t)=t^2-yt+(y-1)=\big(t-(y-1)\big)(t-1)\,,$$
implying $x=y-1$ or $x=1$.
In summary, the solutions $(x,y)\in\mathbb{Z}_{>0}^2$ to (#)$ are the following.

*

*If $k=1$, then the solutions are $(x,y)=(1,m)$ and $(x,y)=(n,n+1)$, where $m$ and $n$ are positive integers with $n\geq 2$.


*If $k>1$, then there is a unique solution $(x,y)=(k^2,k)$.
Furthermore, all solutions $(x,y)\in\mathbb{Z}^2$ to (#) are the following.

*

*If $k\leq -2$, then the solutions are $(x,y)=(0,k)$, $(x,y)=(k^2,k)$, and $(x,y)=(-k-1,-1)$.


*If $k=-1$, then the solutions are $(x,y)=(0,-1)$, $(x,y)=(-3,5)$, and $(x,y)=(-2,5)$.


*If $k=0$, then the solutions are $(x,y)=(n,-n^2)$, where $n$ is an integer such that $n\neq1$.


*If $k=1$, then the solutions are $(x,y)=(1,m)$ and $(x,y)=(n,n+1)$, where $m$ and $n$ are integers with $m\neq -1$ and $n\neq 1$.


*If $k\geq 2$ is not a perfect square, then the solutions are $(x,y)=(-k-1,-1)$, $(x,y)=(0,k)$, and $(x,y)=(k^2,k)$.


*If $k\geq 4$ is a perfect square,  then the solutions are $(x,y)=(-k-1,-1)$, $(x,y)=(\pm\sqrt{k},0)$, $(x,y)=(0,k)$, and $(x,y)=(k^2,k)$.
However, if we solve the Diophantine equation $$x^2+y=k(xy+1)$$ for $(k,x,y)\in\mathbb{Z}^3$, then there is an extra solution for each $k\in\mathbb{Z}$: $(x,y)=(1,-1)$.
