Added utility to compute number chains.