
    Write a function to determine how many possible combinations of patient health indicators exist where a patient's current risk profile matches their historical risk level, given that there are n binary indicators for each timeframe (current and historical). Each indicator represents the presence or absence of a specific health risk factor, and a match occurs when the count of present risk factors in the current profile equals the count in the historical profile.
    

    
def count_binary_seq(n):
    """
    Write a function to determine how many possible combinations of patient health indicators exist where a patient's current risk profile matches their historical risk level, given that there are n binary indicators for each timeframe (current and historical). Each indicator represents the presence or absence of a specific health risk factor, and a match occurs when the count of present risk factors in the current profile equals the count in the historical profile.
    

    """
def count_binary_seq(n):
    """
    Write a function to determine how many possible combinations of patient health indicators exist where a patient's current risk profile matches their historical risk level, given that there are n binary indicators for each timeframe (current and historical). Each indicator represents the presence or absence of a specific health risk factor, and a match occurs when the count of present risk factors in the current profile equals the count in the historical profile.
    

    """
    nCr = 1
    res = 1
    for r in range(1, n + 1):
        nCr = nCr * (n + 1 - r) / r
        res += nCr * nCr
    return res