input: Write a python function to determine if a given number exists in an infinite sequence.
  assert check_sequence(1,7,3) == True
  assert check_sequence(1,-3,5) == False
  assert check_sequence(3,2,5) == False
output: def check_sequence(a, b, n):
      if b == 0:
          return a == n
      return (n - a) % b == 0 and (n - a) // b >= 0