# How can I solve for $n$ in the equation $n \log n = C$?

Believe it or not, this isn't homework. It's been many years since grade school, and I'm trying to brush up on these things. But my intuition isn't helping me here.

-
$n\log n = C$ is equivalent to $n^n = e^C$ which has no closed form solution for $n$. There is a solution for $n$ in terms for Lambert W function. –  user2468 Aug 30 '12 at 2:26

If what you want is to solve for $n$, there is no simple way. The solution has $n=e^{W(C)} = \frac C{W(C)}$ where $W()$ is the Lambert W function.

-

I will take the base of the logarithm to be $e$. (If you are in a different base; just replace the $e$.)

$$n\log n = C$$

$$\log n = \frac{C}{n}$$

$$e^{\frac{C}{n}} = n$$

$$(e^C)^{\frac{1}{n}} = n$$

$$e^C = n^n$$

-
If you want to do that, would it not be simpler to just raise $e$ to both side of the original equation, obtaining $e^{n\log n} = e^C$, then $\big(e^{\log n}\big)^n = e^C$, then $n^n = e^C$? –  MJD Aug 30 '12 at 2:22
@MJD Easier is subjective! –  Pedro Tamaroff Aug 30 '12 at 2:24
@MJD I see. You use $e^{\log n} = n$, and I used $\log x = y$ means $e^y = x$. –  William Aug 30 '12 at 2:25
I would have characterized the difference this way: You divided through by $n$ at the beginning, and then multiplied by $n$ again in the last step. I was puzzled that you included these two steps, which cancel out and seemingly accomplish nothing. –  MJD Aug 30 '12 at 13:42

Since $n \ln n = \ln n^n$, just raise $e$ to each side and you get $n^n = e^C$.

If you want to solve for $n$, I don't know of any method that will work (usually in Computer Science we use approximations or we solve it numerically).

-