Suppose, I have a positive integer $\ N\ $ with many divisors , like a primorial or a factorial. The prime factorization of $\ N\ $ is known.
Can I efficiently (without enumerating the divisors) find the divisors nearest to the square root , in other words the positive integers $\ a,b\ $ with $\ ab=N\ $ such that $\ d:=|a-b|\ $ is as small as possible ?
I tried to cosnsider the equation $\ x(x+d)=N\ $ which can only have an integer solution if $\ d^2+4N\ $ is a perfect square. But solving $\ e^2=d^2+4N\ $ would again require the factors of $\ N\ $. Any ideas ?