
    Write a function to determine the number of possible ways a student's academic performance pattern could be distributed over two equal assessment periods, where each period contains n assignments marked as completed (1) or incomplete (0), such that the total number of completed assignments in the first period equals the total in the second period.
    

    
def count_binary_seq(n):
    """
    Write a function to determine the number of possible ways a student's academic performance pattern could be distributed over two equal assessment periods, where each period contains n assignments marked as completed (1) or incomplete (0), such that the total number of completed assignments in the first period equals the total in the second period.
    

    """
def count_binary_seq(n):
    """
    Write a function to determine the number of possible ways a student's academic performance pattern could be distributed over two equal assessment periods, where each period contains n assignments marked as completed (1) or incomplete (0), such that the total number of completed assignments in the first period equals the total in the second period.
    

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