
    Write a function to determine the number of possible transaction activity patterns over 2n time periods, where each period is marked as either suspicious (1) or normal (0), such that the count of suspicious transactions in the first n periods equals the count in the last n periods.
    

    
def count_binary_seq(n):
    """
    Write a function to determine the number of possible transaction activity patterns over 2n time periods, where each period is marked as either suspicious (1) or normal (0), such that the count of suspicious transactions in the first n periods equals the count in the last n periods.
    

    """
def count_binary_seq(n):
    """
    Write a function to determine the number of possible transaction activity patterns over 2n time periods, where each period is marked as either suspicious (1) or normal (0), such that the count of suspicious transactions in the first n periods equals the count in the last n periods.
    

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