Very nice. Mathematica can clearly do the job. But I feel like there is still a lot of room for improvement. Clearly though, the proof would be more and more difficult.
(*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[#!&][#][#]&)
Smart. It didn't occur to me to have the base case be an arbitrary function. Yours is much larger than mine. One comment: M=Nest; is a waste of characters. I tried that in my solution too, but it wound up costing me an extra character ;). So I think you're down to 75 characters. It might make sense to remove the factorial, and change the base case of u to f@f@f@f@a.
Using the infix special form ~ we can cram in another ^#:
I should also note that I'm not confident as to which of
is larger.
Very nice. Mathematica can clearly do the job. But I feel like there is still a lot of room for improvement. Clearly though, the proof would be more and more difficult.
Here is my modification:
82 chars total.
comments:
Smart. It didn't occur to me to have the base case be an arbitrary function. Yours is much larger than mine. One comment: M=Nest; is a waste of characters. I tried that in my solution too, but it wound up costing me an extra character ;). So I think you're down to 75 characters. It might make sense to remove the factorial, and change the base case of u to f@f@f@f@a.
1 reply →
I think there might be a nice way to use #0 to blow up the numbers even further. But I have to do real work :)