u[n_][a_,b_]:=If[n==0,a b,Nest[a~u[n-1]~#&,1,b]];Nest[#~u[#^#^#^#]~#&,9,9~u@9~9]
I should also note that I'm not confident as to which of Nest[#~u[#^#^#^#]~#&,9,9~u@9~9]
Nest[#~u@#~#&,9,9~u[9^9^9^9]~9]
is larger.Here is my modification:
M=Nest;
u[f_][n_][a_]:=If[n<1,f@a,M[u[f][n-1],a,a]];
u[#][#@9][#@9]&@(u[#!&][#][#]&)
82 chars total.comments:
(*start with definition of Knuth up arrow*)
u1[n_][a_][b_]:=If[n==0,a b,Nest[u[n-1]@a,1,b]]
(*let treat 1 as symbol and take 1 == b == a *)
u2[n_][a_]:=If[n==0,a a,Nest[u[n-1],a,a]]
(*next define for arbitrary function f instead of multiplication*)
u[f_][n_][a_]:=If[n==0,f@a,Nest[u[n-1],a,a]]
(*numerical example when we take n<3 instead of n==0*)
u[#! &][#][#] &@3 = u[#! &][3][3] = 10^1746
(*Next take the function f and parameters a to be: *)
f = u[#!&][#][#]&
a = f@9
(*compute final number*)
u[f][a][a]
(*those 3 steps are shortened to: *)
u[#][#@9][#@9]&@(u[#!&][#][#]&)But remember:
Never forget that it is a waste of energy to do the same thing twice, and that if you know precisely what is to be done, you need not do it at all. --- E. E. ``Doc'' Smith (1930)
...the optimal solution avoids all pattern.
--- Douglas Hofstadter (1983)
http://djm.cc/bignum-results.txtSo I would recommend to avoid things like f@f@f@f@a where there is clearly a pattern.