Take the 2-minute tour ×

I'm trying to find the value for $n$ in the following equation.

$$n \log_2 n = c$$

what is $n$?

thanks, Tim

share|improve this question
Is $c$ an integer? a real number? a complex number? –  Asaf Karagila Jun 20 '12 at 21:57
add comment

3 Answers

up vote 2 down vote accepted

There is no closed solution formula for such equations. You will have to find the solution numerically -- that is, by trial and error, bisection, Newton iteration or the like.

(One can write down a solution in terms of the Lambert W function, but from a practical point of view that "solution" just amounts to giving a fancy name to our inability to get an exact solution using ordinary algebra. It doesn't actually help with calculating the solution).

share|improve this answer
Thanks, I can get an answer with trial and error, so I'll just have do to that. –  Tim Jun 20 '12 at 22:05
add comment

$n = 2^k \implies k 2^k = c \implies (k \log2) e^{k \log (2)} = c \log 2$. Now the Lambert function, $W(z)$, is defined as $$W(z) e^{W(z)} = z$$ Hence, $$k \log 2 = W(c \log 2) \implies k = \dfrac{W(c \log 2)}{\log 2} \implies n = 2^{\dfrac{W(c \log 2)}{\log 2}} = \exp \left( W(c \log 2)\right)$$

share|improve this answer
add comment

Such equations have the following solution : $$n = \frac{c\ln(2)}{W(c\ln(2))}$$ where $W$ is the Lambert-W function.

share|improve this answer
add comment

Your Answer


