
    In a city's hexagonal traffic management grid, determine the total number of connected intersections that need to be monitored when expanding outward by n tiers from a central hub intersection. Each tier forms a hexagonal pattern of intersections around the previous tier, with the central hub counting as tier 0, and the system needs to calculate the cumulative count of all intersections up to and including the specified tier n.
    

    
def centered_hexagonal_number(n):
    """
    In a city's hexagonal traffic management grid, determine the total number of connected intersections that need to be monitored when expanding outward by n tiers from a central hub intersection. Each tier forms a hexagonal pattern of intersections around the previous tier, with the central hub counting as tier 0, and the system needs to calculate the cumulative count of all intersections up to and including the specified tier n.
    

    """
def centered_hexagonal_number(n):
    """
    In a city's hexagonal traffic management grid, determine the total number of connected intersections that need to be monitored when expanding outward by n tiers from a central hub intersection. Each tier forms a hexagonal pattern of intersections around the previous tier, with the central hub counting as tier 0, and the system needs to calculate the cumulative count of all intersections up to and including the specified tier n.
    

    """
    return 3 * n * (n - 1) + 1