input: Write a python function that calculates the nth centered hexagonal number.
  assert centered_hex_hex_number(10) == 271
  assert centered_hex_hex_number(2) == 7
  assert centered_hex_hex_number(9) == 217
output: def centered_hex_hex_number(n):
      return 3 * n * (n - 1) + 1