
    Given a patient's medical history containing n previous hospital admissions, calculate their readmission risk score by summing the weighted impact of each prior admission, where the kth most recent admission contributes a factor of 1/k to the total risk score. The final score should consider n-1 previous admissions, excluding the current visit.
    

    
def harmonic_sum(n):
    """
    Given a patient's medical history containing n previous hospital admissions, calculate their readmission risk score by summing the weighted impact of each prior admission, where the kth most recent admission contributes a factor of 1/k to the total risk score. The final score should consider n-1 previous admissions, excluding the current visit.
    

    """
def harmonic_sum(n):
    """
    Given a patient's medical history containing n previous hospital admissions, calculate their readmission risk score by summing the weighted impact of each prior admission, where the kth most recent admission contributes a factor of 1/k to the total risk score. The final score should consider n-1 previous admissions, excluding the current visit.
    

    """
    if n < 2:
        return 1
    else:
        return 1 / n + harmonic_sum(n - 1)