
    Develop an algorithm to calculate a patient's readmission risk score at a specific admission sequence number, where each risk score is determined by the sum of risk scores from two previous admissions following the hospital's recursive pattern analysis system. The first two values in the risk scoring sequence are 1, and each subsequent value is determined by the sum of values at positions P(P(n-1)) and P(n-P(n-1)), where P(n) represents the risk score at position n.
    

    
def sequence(n):
    """
    Develop an algorithm to calculate a patient's readmission risk score at a specific admission sequence number, where each risk score is determined by the sum of risk scores from two previous admissions following the hospital's recursive pattern analysis system. The first two values in the risk scoring sequence are 1, and each subsequent value is determined by the sum of values at positions P(P(n-1)) and P(n-P(n-1)), where P(n) represents the risk score at position n.
    

    """
def sequence(n):
    """
    Develop an algorithm to calculate a patient's readmission risk score at a specific admission sequence number, where each risk score is determined by the sum of risk scores from two previous admissions following the hospital's recursive pattern analysis system. The first two values in the risk scoring sequence are 1, and each subsequent value is determined by the sum of values at positions P(P(n-1)) and P(n-P(n-1)), where P(n) represents the risk score at position n.
    

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