How can an integer be factorized as n*m so that n^m has the highest value. [closed]

Given an integer d, is there a way of finding max(n^m), where d=n*m, except brute-forcing it ? n and m don't have to be primes.

For example:

The number 12 can be factorized into two factors as: 1*12, 2*6, 3*4, 4*3, 6*2 and 12*1. Raising the first factor to the second gives: 1, 64, 81, 64, 36 and 12. The maximum value is 81.

-

closed as off topic by Douglas Zare, Brendan McKay, Gerry Myerson, Qiaochu Yuan, quid Feb 27 '13 at 11:29

Questions on MathOverflow are expected to relate to research level mathematics within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

This is not really a research-level question, I think. But anyway, a hint is that you're looking to maximize $n^{d/n} = (n^{1/n})^d$. So try to maximize $n^{1/n}$ over divisors of $d$. – Abhinav Kumar Feb 27 '13 at 2:46

If $n$ is divisible by three than the required split is $(3,n/3)$. If $n$ is not divisible by 3 then the required split is $(p,n/p)$ where $p$ is the smallest prime divisor of $n$.
Simpler: it's always $(p,n/p)$ where $p$ is the prime divisor of $n$ closest to $3$. – Gerry Myerson Feb 27 '13 at 12:03
Less simple but closer to the computation: It's the prime divisor closest to $e$. – Andreas Blass Feb 27 '13 at 16:25