I have searched stackoverflow (and comparable pages) for quite a while now (got redirected from there to this specialized stack), and I surrender. I am trying to evaluate an expression that is small in the end numerically.



WolframAlpha has no problem evaluating these values for (any/a very high) amount of exponents (I tried it up to 20). I guess it is possible to achieve this in Mathematica aswell?

I tried Hold, Defer etc, as described in
Hoever none of these did what I hoped for. Is it a matter of explaining Mathematica the rules of logarithms?

FullSimplify[Log[x^b], x>0 && b>0]

expands it nicely, however that is not what I want (I have explicit numbers). Is there any way to perform the calculations WolframAlpha performs with mathematica (obviously avoiding the WolframAlpha Output Operator ;)) ?

Is there some Option/Assumption etc I have overlooked?

For this specific question there is a recursive algebraic solution: $$ n^{(n-1)^{...^1}}=e^{\log(n)*(n-1)^{...^1}} $$ and so on, remove a bunch of e-s at the end. I guess Wolfram|Alpha uses this. I would still like to know if theres a true Mathematica solution to this.

  • 1
    $\begingroup$ tt = Log[Log[Log[6^5^4^3^2^1]]] // HoldForm; and tt /. Log[a_^b_] -> b Log[a] // Release // N does provide you with the answer? $\endgroup$
    – chris
    Commented Oct 18, 2012 at 20:01
  • $\begingroup$ Probably not quite what you are looking for, but maybe a start: PowerExpand[Log[Log[Log[a^b^c^d^e^f]]]] /. {a -> 6, b -> 5, c -> 4, d -> 3, e -> 2, f -> 1} $\endgroup$
    – chuy
    Commented Oct 18, 2012 at 20:27
  • $\begingroup$ @chris, oh yes it does, problem consists of something else now (see below); thank you! $\endgroup$
    – CBenni
    Commented Oct 18, 2012 at 21:34
  • 1
    $\begingroup$ I posted a related question on Mathematics $\endgroup$ Commented Oct 19, 2012 at 15:32

2 Answers 2


For example you could do:

rules = {Log[x_ y_] :> Log[x] + Log[y], Log[x_^k_] :> k Log[x]};
N[Defer@Log[Log[Log[6^5^4^3^2^1]]] //. rules]
--> 12.9525

But you should be aware that it doesn't work ad-infinitum because your expression stops transforming after you get to

$\log \left(\log (5) 4^{3^{2^1}}+\log (\log (6))\right)$


I posted a related question in Mathematics (no full answer yet)

  • $\begingroup$ Works wonderfully! The Problem got delayed a bit (but hey, thanks for your help!). I have n^...^1 defined as a function a[n_]:=n^a[n-1] ofcourse, this wont expand to 6^5^4^3^2^1 for a[6], instead it will produce an overflow. I will have to try to get a[6] to evaluate to the Power tower and then I should be fine $\endgroup$
    – CBenni
    Commented Oct 18, 2012 at 21:20
  • $\begingroup$ That wasnt too hard lol: b[n_]:=HoldForm[n]^b[n-1] great success! Damn, Problem still not solved. For n>=8, I still receive overflows. -.- $\endgroup$
    – CBenni
    Commented Oct 18, 2012 at 21:35

An alternative could be

Block[{Power, Log},
 Log[Log[Log[6^5^4^3^2^1]]] // PowerExpand]

Log[262144 Log[5] + Log[Log[2] + Log[3]]]

% // N


Still gives overflows, it's equivalent to @belisarius's


Log[Log[Log[6^5^4^3^2^1]]] // Hold // PowerExpand // ReleaseHold

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.