how to determine if a sequence is numeric or geometric injava