
    In a medical imaging system that analyzes tissue samples using hexagonal scanning patterns, develop a function that calculates the total number of detection points needed to complete n layers of hexagonal scanning around a central region of interest. Each subsequent layer forms a larger hexagonal pattern around the previous one, with the central point representing the initial tissue sample location.
    

    
def centered_hexagonal_number(n):
    """
    In a medical imaging system that analyzes tissue samples using hexagonal scanning patterns, develop a function that calculates the total number of detection points needed to complete n layers of hexagonal scanning around a central region of interest. Each subsequent layer forms a larger hexagonal pattern around the previous one, with the central point representing the initial tissue sample location.
    

    """
def centered_hexagonal_number(n):
    """
    In a medical imaging system that analyzes tissue samples using hexagonal scanning patterns, develop a function that calculates the total number of detection points needed to complete n layers of hexagonal scanning around a central region of interest. Each subsequent layer forms a larger hexagonal pattern around the previous one, with the central point representing the initial tissue sample location.
    

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