Determining the type of sequence (arithmetic or geometric)