TITLE: Find asymptotics of $x(n)$, if $n = x^{x!}$
QUESTION [5 upvotes]: Find the asymptotic for $x(n)$, if  $n = x^{x!}$.
I've tried 
1) to take a logarithm:
$x! \log{x} = \log{n}$.
2) to find $n'(x)$, using gamma-function for factorial
$\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt$
I'm here now:
$\frac{1}{n}n'(x) = \Gamma'(x+1)\log{x} + \Gamma(x) $
$n'(x) = x^{x!}(\Gamma'(x+1)\log{x} + \Gamma(x)) $
What should I do next? Should I use another way of solving this problem?
I'm new to this theme, I will be grateful for any help.

REPLY [4 votes]: This matches Antonio Vargas's first answer, but the derivation is a bit shorter.
$$
\begin{align}
n&=x^{x!}\\[6pt]
\log(n)
&=x!\log(x)\\
\log(\log(n))
&=\log(\log(x))+x\log(x)-x+\frac12\log(2\pi x)\\
&=x\log(x)\left(1-\frac1{\log(x)}+\frac1{2x}+\frac{\log(\log(x))}{x\log(x)}+\frac12\frac{\log(2\pi)}{x\log(x)}\right)\\
\log(\log(\log(n)))
&=\log(x)+\log(\log(x))-\frac1{\log(x)}+O\left(\frac1{\log(x)^2}\right)\\
&=\log(x)\left(1+\frac{\log(\log(x))}{\log(x)}-\frac1{\log(x)^2}+O\left(\frac1{\log(x)^3}\right)\right)\\
\frac{\log(\log(n))}{\log(\log(\log(n)))}
&=x\left(1-\frac{\log(\log(x))}{\log(x)}-\frac1{\log(x)}+O\left(\frac{\log(\log(x))}{\log(x)}\right)^2\right)
\end{align}
$$
Therefore, since $\log(x)\sim\log(\log(\log(n)))$, we get
$$
x=\frac{\log(\log(n))}{\log(\log(\log(n)))}\left(1+O\left(\frac{\log(\log(\log(\log(n))))}{\log(\log(\log(n)))}\right)\right)
$$
Note that to get $\frac{\log(\log(\log(\log(n))))}{\log(\log(\log(n)))}\sim\frac1{10}$, we need $\log(\log(\log(n)))\sim36$; that is, $n$ needs to be huge.