A centered hexagonal number is a figurate number that represents a hexagon with a dot in the center and all other dots surrounding the center dot in a hexagonal lattice. The formula to calculate the nth centered hexagonal number is:
\[ H_n = 3n(n-1) + 1 \]
Write a function `centered_hexagonal_number(n)` that takes an integer `n` and returns the nth centered hexagonal number.
#### Example Usage
```python [main.nopy]
centered_hexagonal_number(1) # Output: 1
centered_hexagonal_number(2) # Output: 7
centered_hexagonal_number(3) # Output: 19
```
#### Constraints
- The input `n` will be a positive integer.
- The function should return an integer.