Identifying arithmetic and geometric sequences