Goodstein function (source code)

= Goodstein function
{c}
{title2=$\mathcal G(m)=\min\{s:m_s=0\}$}

The <Goodstein function> records the least step at which the <Goodstein sequence> from a given initial number reaches zero. With the initial step numbered zero, its values on $0,1,2,3$ are $0,1,3,5$. <Goodstein's theorem> makes this effective termination-time <function> total.