# Preventing Numerical value from being evaluated

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.

Example:

Log[Log[Log[6^5^4^3^2^1]]]=12.9525...

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
https://stackoverflow.com/questions/1616592/mathematica-unevaluated-vs-defer-vs-hold-vs-holdform-vs-holdallcomplete-vs-etc
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.

• 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? Oct 18, 2012 at 20:01
• 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}
– chuy
Oct 18, 2012 at 20:27
• @chris, oh yes it does, problem consists of something else now (see below); thank you! Oct 18, 2012 at 21:34
• I posted a related question on Mathematics Oct 19, 2012 at 15:32

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)$

Edit

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

• 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, instead it will produce an overflow. I will have to try to get a to evaluate to the Power tower and then I should be fine Oct 18, 2012 at 21:20
• 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. -.- 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 + Log[Log + Log]]

% // N


12.9525

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

Also,

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