Given n and b positive integers,

g_{b}(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=2^{9}+2^{4}+1=2^{23+1}+2^{22}+1=2^{22+1+1}+2^{22}+1

Now, replace each occurence of b by b+1 and finally substract 1 to get g_{b}(n)

eg. g_{2}(529)=3^{33+1+1}+3^{33} (which is approximately 1.33x10^{39})

the sequence g_{b}(n), g_{b+1}(g_{b}(n), g_{b+2}(g_{b+1}(g_{b}(n)),...
is called the *Goodstein sequence*.
As you might guess, this sequence grows really fast to really big numbers, however...