input: Craft a function to compute the nth centered hexagonal number.
  assert centered_hexagonal_number(10) == 271
  assert centered_hexagonal_number(2) == 7
  assert centered_hexagonal_number(9) == 217
output:     def centered_hexagonal_number(n):
      return 3 * n * (n - 1) + 1