Code to generate Goodstein sequences