
    Design a function that calculates the optimal number of hospital beds for the nth ward expansion phase, where each phase follows an octagonal growth pattern to maximize space efficiency and patient accessibility. The calculated bed capacity must follow the hospital's standardized geometric expansion model, where the nth arrangement is determined by the formula for the nth octagonal number.
    

    
def is_octagonal(n):
    """
    Design a function that calculates the optimal number of hospital beds for the nth ward expansion phase, where each phase follows an octagonal growth pattern to maximize space efficiency and patient accessibility. The calculated bed capacity must follow the hospital's standardized geometric expansion model, where the nth arrangement is determined by the formula for the nth octagonal number.
    

    """
def is_octagonal(n):
    """
    Design a function that calculates the optimal number of hospital beds for the nth ward expansion phase, where each phase follows an octagonal growth pattern to maximize space efficiency and patient accessibility. The calculated bed capacity must follow the hospital's standardized geometric expansion model, where the nth arrangement is determined by the formula for the nth octagonal number.
    

    """
    return 3 * n * n - 2 * n