refactor each_cons
consecutive numbers with missing element