What I would do, if you really wanted to do this semi-symbolically, is to use Piecewise to create a piecewise function that does $g(x)$ as far out as you need it to go. I guess to plot it out to $n=5$ and $x=1$ would require you to have $g$ out to $2^{32}$... hmm, that seems pretty far!