
    Design a function for the bank's loan approval system that calculates the nth credit risk pattern number, where each number in the pattern is determined by how many times previous risk assessment scores appeared in earlier evaluations, following the same mathematical relationship as the Newman-Conway sequence. The risk pattern starts with 1,1 and each subsequent number is determined by counting the frequency of the previous risk scores, helping establish a predictable progression for automated credit decisioning.
    

    
def sequence(n):
    """
    Design a function for the bank's loan approval system that calculates the nth credit risk pattern number, where each number in the pattern is determined by how many times previous risk assessment scores appeared in earlier evaluations, following the same mathematical relationship as the Newman-Conway sequence. The risk pattern starts with 1,1 and each subsequent number is determined by counting the frequency of the previous risk scores, helping establish a predictable progression for automated credit decisioning.
    

    """
def sequence(n):
    """
    Design a function for the bank's loan approval system that calculates the nth credit risk pattern number, where each number in the pattern is determined by how many times previous risk assessment scores appeared in earlier evaluations, following the same mathematical relationship as the Newman-Conway sequence. The risk pattern starts with 1,1 and each subsequent number is determined by counting the frequency of the previous risk scores, helping establish a predictable progression for automated credit decisioning.
    

    """
    if n == 1 or n == 2:
        return 1
    else:
        return sequence(sequence(n - 1)) + sequence(n - sequence(n - 1))