Given n and b positive integers,
gb(n) can be constructed as follows:
First, write n in base b with all exponents (and exponents of exponents and so on) in base b.
eg. for n=529 and b=2, 529=29+24+1=223+1+222+1=222+1+1+222+1
Now, replace each occurence of b by b+1 and finally substract 1 to get gb(n)
eg. g2(529)=333+1+1+333 (which is approximately 1.33x1039)
the sequence gb(n), gb+1(gb(n), gb+2(gb+1(gb(n)),...
is called the Goodstein sequence.
As you might guess, this sequence grows really fast to really big numbers, however...