Finding the Next Number in a Sequence