0
$\begingroup$

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.

$\endgroup$
1
  • 8
    $\begingroup$ 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$. $\endgroup$ Feb 27, 2013 at 2:46

1 Answer 1

5
$\begingroup$

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$.

$\endgroup$
2
  • $\begingroup$ Simpler: it's always $(p,n/p)$ where $p$ is the prime divisor of $n$ closest to $3$. $\endgroup$ Feb 27, 2013 at 12:03
  • 2
    $\begingroup$ Less simple but closer to the computation: It's the prime divisor closest to $e$. $\endgroup$ Feb 27, 2013 at 16:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.