how to determine the first five terms