
    Design a function for an adaptive learning platform that determines how many possible ways a student can achieve equal performance scores between the first and second half of a 2n-length assessment sequence, where each assessment result is marked as pass (1) or fail (0). The function should calculate all possible combinations where the number of successful assessments in the first n tasks equals the number of successes in the last n tasks, helping identify patterns of consistent student performance across the learning period.
    

    
def count_binary_seq(n):
    """
    Design a function for an adaptive learning platform that determines how many possible ways a student can achieve equal performance scores between the first and second half of a 2n-length assessment sequence, where each assessment result is marked as pass (1) or fail (0). The function should calculate all possible combinations where the number of successful assessments in the first n tasks equals the number of successes in the last n tasks, helping identify patterns of consistent student performance across the learning period.
    

    """
def count_binary_seq(n):
    """
    Design a function for an adaptive learning platform that determines how many possible ways a student can achieve equal performance scores between the first and second half of a 2n-length assessment sequence, where each assessment result is marked as pass (1) or fail (0). The function should calculate all possible combinations where the number of successful assessments in the first n tasks equals the number of successes in the last n tasks, helping identify patterns of consistent student performance across the learning period.
    

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