Let $a,b,n$ be natural numbers (in $\mathbb{N}^*$) such that $a>b$ and $n^2+1=ab$
How can one show that $a-b\geq\sqrt{4n-3}$, and for what values of $n$ equality holds?
I tried this: We suppose that $a-b\geq\sqrt{4n-3}$ so
$$a^2-2ab+b^2\geq 4n-3\,.$$
And we have $ab=n^2+1$.
So $a^2-2(n^2+1)+b^2-4n+3\geq 0$.
So $a^2-2n^2+b^2-4n+1\geq 0$.
I'm stuck here! How do I proceed?
Let $x:=a-n$ and $y:=b+x-n$ (that is, $a=n+x$ and $b=n-x+y$). It can be easily seen that $x$ and $y$ are positive integers. We want to find $a-b=2x-y$. Note that $n^2+1=ab$ implies that $x^2-xy=ny-1$, or equivalently, $(2x-y)^2=y^2+4(ny-1)$. As $y\geq 1$, we have $$(a-b)^2=(2x-y)^2\geq 1+4(n-1)=4n-3\,$$ Therefore, $a-b\geq \sqrt{4n-3}$. The equality holds iff $y=1$, which leads to $$(n,a,b)=\left(x^2-x+1,x^2+1,x^2-2x+2\right)$$ for a positive integer $x$.