# Why $2^{n\log_2n}=n^n$?

I couldn't find any answer on the internet so I came here, I'm trying to understand how $2^{n\log_2n}=n^n$

I know that $n^n=e^{\ln{n^n}}=e^{n\ln{n}}$

So far I've got $2^{n\log_2n}=2^{\log_2{n^n}}=2^{\frac{\ln{n^n}}{\ln2}}$

Then I'm stuck, I'm not even sure I'm going the good way..

• Thanks everyone! Feb 18 '18 at 20:42

$\log_2(x)$ is defined to be the number $y$ such that $2^y = x$.

Therefore $$2^{n \log_2(n)} = \left(2^{\log_2(n)}\right)^n = n^n$$

Your way will work, but you need to write the bottom $2$ as $e^{\ln(2)}$ before you can make progress.

Note that by definition

$$x=\log_2^n\iff 2^x=n$$

thus

$$2^{n\log_2n}=(2^x)^n=n^n$$

For the same reason as $\; n^n=\mathrm e^{n\log n}$. Only the basis of the logarithm changes.

$$2^{n\log2^n}=2^{\log2^{n^n}}$$

$\log 2$ and $2$ are inverses, so they cancel out, so

$$2^{n\log2^n}=n^n$$

Let me explain why they cancel out.

You know $\log_a a^x=x$, and you need to prove $a^{\log_a x}=x$

Set $\log_ax=y$, and make this equation in exponential form, so $\log_ax=y \implies x=a^y$.

Using substitution, $a^{\log_ax}=a^{\log_aa^y}$. Using what you know, $a^{\log_aa^y}=a^y$.

Since $a^y=x$, $a^{\log_a x}=x$.

Use this to help you prove $2^{n \log_2n}=n^n$

taking the logarithm on both sides we get $$n\log_{2}{n}\ln(2)=n \ln(n)$$ dividing by $$\ln(2)$$ we obtain 4$$n\log_{2}{n}=n\frac{\ln(n)}{\ln(2)}=n\log_{2}{n}$$ which is true.