input: Write a python function to detect patterns in a list of numbers where the difference between consecutive numbers is exactly 3.
  assert detect_patterns([3, 6, 9, 12, 15, 18, 21]) == [1, 1, 1, 1, 1, 1]
  assert detect_patterns([3, 6, 10, 13, 16, 18, 21]) == [1, 0, 1, 1, 0, 1]
  assert detect_patterns([1, 4, 7, 11, 14, 17]) == [1, 1, 0, 1, 1]
output: def detect_patterns(numbers):
      return [1 if numbers[i+1] - numbers[i] == 3 else 0 for i in range(len(numbers) - 1)]