
    Write a function to identify the number of possible transaction pattern sequences of length 2n, where each pattern consists of binary flags indicating transaction characteristics, and the sum of fraud indicators in the first n transactions equals the sum in the last n transactions. These patterns help detect symmetrical anomalies that could signal coordinated fraudulent activities.
    

    
def count_binary_seq(n):
    """
    Write a function to identify the number of possible transaction pattern sequences of length 2n, where each pattern consists of binary flags indicating transaction characteristics, and the sum of fraud indicators in the first n transactions equals the sum in the last n transactions. These patterns help detect symmetrical anomalies that could signal coordinated fraudulent activities.
    

    """
def count_binary_seq(n):
    """
    Write a function to identify the number of possible transaction pattern sequences of length 2n, where each pattern consists of binary flags indicating transaction characteristics, and the sum of fraud indicators in the first n transactions equals the sum in the last n transactions. These patterns help detect symmetrical anomalies that could signal coordinated fraudulent activities.
    

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