Graham's number G
is defined in that way:
3^n = 3*..n times ...*3
3^^n = 3^(3^n)
3^^^n = 3^^(3^^n)
3^^^^n = 3^^^(3^^^n)
g1 = 3^^^^3
g2 = 3^^...g1 times^^3
g3 = 3^^...g2 times^^3
...
G = 3^^...g63 times^^3
Write down the shortest valid algorithm in the language of your choice, which uses a theoretically unbounded integers structure which computes Graham's number. Of course any algorithm will stack overflow, but suppose you have an infinite machine and infinite time.
The winner will have the lowest score based on the following:
(number of calls to functions + number of assignments) ^^ (size of the program)