Add type declaration to goodsteinSequence.