human
What is a Python program to find nth centered hexagonal number given the following:
Write a function to find nth centered hexagonal number. Here is a solution in Python:
assistant
#Here is Python program to find nth centered hexagonal number.
 def centered_hexagonal_number(n):
  return 3 * n * (n - 1) + 1