Number Theory – Minimizing $x+y$ in $x^y=a$

number theoryoptimizationprime factorization

Regarding this recent question, the question asks for minimizing $x+y$, given $x^y=a$, (for a constant real positive $a$) for real and positive values of $x$ and $y$.
Now $(x,y)=\left(\exp\left({2W\left(\frac{\sqrt{\ln a}}{2}\right)}\right),\frac{\ln(a)}{2W\left(\frac{\sqrt{\ln a}}{2}\right)}\right)$ was the solution in that case. But I am curious to know what would happen if we restrict $x$ and $y$ to being positive integers (with $a$ being an integer greater than $1$) and then try to minimise $x+y$ under the given constraint.

I think that using the prime factorization of $a$, something like $\alpha^A\beta^B\gamma^C…$ (where $\alpha$, $\beta$ and $\gamma$ are primes), we might be able to come to a solution, but so far, I haven't been able to proceed. Perhaps something with the common divisors of the exponents in the prime factorization? (That might denote possible values of $y$)

I will link this question to the previous one too.

All help and clarification requests are welcome.

Edit: algorithmic answers like the one by @stef are perfectly acceptable, but I am looking for a more mathematical form.

Best Answer

Let $a>1$ be an integer, and let $x$ and $y$ be positive integers such that $x^y=a$. If $a$ is not a perfect power then it follows that $x=a$ and $y=1$, and so the minimum value of $x+y$ is $a+1$.

If $a$ is a perfect power then we can$^{1}$ write $a=b^c$ for integers $b$ and $c$ such that $b$ is not a perfect power. Then $$x=b^d\qquad\text{ and }\qquad y=\frac cd,$$ for some divisor $d$ of $c$, and so we want to minimize $b^d+\tfrac cd$. Of course $b>1$ because $a>1$, and for $$f(t):=b^t+\frac ct\qquad\text{ we have }\qquad f'(t)=b^t\ln b -\frac{c}{t^2},$$ and so $f'(t)=0$ if $f$ is minimal at $t$, because $f$ is continuous on the positive reals. Then $t^2b^t\ln b=c$, so $$t^2e^{t\ln b}=\frac{\ln c}{\ln b}\qquad\text{ and so }\qquad we^w=\frac12\sqrt{(\ln b)(\ln c)},$$ where $w=\tfrac12t\ln b$. This shows that the minimum of $f$ over the positive reals is at $$t_0=\frac{2}{\ln b}W\left(\frac12\sqrt{(\ln b)(\ln c)}\right).$$ Next note that $f$ is a convex function on the positive reals because $$f''(t)=b^t(\ln t)^2+\frac{2c}{t^3},$$ which is strictly positive on the positive reals. It follows that the minimum of $f$ over the positive divisors of $c$ one of the two divisors nearest to the real minimum $t_0$. One can now simply check and compare these two divisors.


1: https://stackoverflow.com/questions/39190815/how-to-make-perfect-power-algorithm-more-efficient

Related Question