input: Write a python function to find the missing number in an array of integers using the formula method.
  assert findMissingNumber([1, 2, 4, 5, 6, 7, 8]) == 3
  assert findMissingNumber([10, 12, 13, 14, 15, 16]) == 11
  assert findMissingNumber([1, 3, 4, 5, 6, 7, 8, 9, 10]) == 2
output: def findMissingNumber(arr):
      n = len(arr) + 1
      total_sum = n * (n + 1) // 2
      arr_sum = sum(arr)
      return total_sum - arr_sum