User blog comment:Deedlit11/Bignum Bakeoff appetizer/@comment-5529393-20140916022609

I just figured out an economical way to implement Goodstein's function. Here is a C implementation:


 * 1) define R ; return

int i = 9 << 99999, b=1;

B(n)	{ if (!n) R 0; int j=0; while (pow(b,++j) <= n)	R pow(b+1, B(--j)) + B(n - pow(b,j)); }

main 	{ while (i*++b) i = B(i)-1 R b;	}

Following Kyodaisuu's lead, this uses math.h without declaring it. Hasn't been tested yet. 137 characters.