Find a permutation of this expression to obtain a maximum possible value Find a permutation $a_1, a_2, ..., a_{1001}$ of the numbers $1,2,...,1001$ such that the expression
$$a_1^{a_2^{a_3^{...^{...^{a_{1001}}}}}}$$
take a maximum possible value.
 A: As your intuition might tell, $$2^{3^{4^{5^{\cdots^{1000^{1001^1}}}}}}$$
will give the largest result.
First of all note that setting $a_i=1$ for $i<1001$ can never give the maximal value. Replacing $1$ to the end of the sequence will give a number larger then the one you had before. So let's just ignore the $1$ from now on.
Now for a proof, we need the following fact:

If $n>1$ is a natural number and $2\leq a<b$, then $b^{a^n}<a^{b^n}$.

Indeed, this inequality is equivalent to $$n\ln(b)-\ln(\ln(b))>n\ln(a)-\ln(\ln(a)).$$
This is true because for every $n>1$, the function $$n\ln(x)-\ln(\ln(x))$$
is strictly increasing over $[2,+\infty[$.
(Its derivative is $\frac nx-\frac1{x\ln x}$ which is strictly postive since $\ln(x)\geq\ln(2)>\frac12\geq\frac1n$.)
Using the above fact a few times you can easily show that $2^{3^{\cdots^{1001}}}$ is the maximum:
Let $2=a_i$. Let's show that it's better to set $a_1=2$.
If $1<i<1000$, we have ${a_{i-1}}^{2^n}<2^{{a_{i-1}}^{n}}$ because of the lemma, where $n={a_{i+1}}^{{a_{i+2}}^{\cdots^{a_{1000}}}}$. So we obtain a larger number by switching $2$ with $a_{i-1}$. We can repeat this until we have $a_1=2$.
If $i=1000$ we can't just use the same trick because $n=1$ in this case. Even worse, $2^3<3^2$!
If $m=a_{999}\geq4$ we can apply the inequality $m^2\leq 2^m$. So certainly we won't get a smaller number when switching $a_{1000}$ with $a_{999}$.
If $m=3$ we can just switch $a_{998}$ with $a_{999}$ (which we know to give a larger number) and then continue as we did in the case $m\geq4$.
Now that we have set $a_1=2$, look where $3$ is in the sequence. You can use similar techniques to make your number larger by letting $3$ descend the power tower down to $a_2$. Then it's $4$'s turn to descend the tower, and so on, and so on...
(To fix some issues at the top of the tower you might want to use the inequality $a^b>b^a$ if $2<a<b$, which can be proved similar to the proof we had before.)
A: My intuition tells me:
$$2^{3^{4^{5^{\dots^{1000^{1001^1}}}}}}$$
is the largest.
It should be obvious.
