
    Given the number of maintenance cycles (n) for a transit vehicle, calculate the cumulative wear factor by finding the harmonic sum of the previous n-1 service intervals. This wear factor helps determine the optimal timing for the next preventive maintenance check based on historical usage patterns.
    

    
def harmonic_sum(n):
    """
    Given the number of maintenance cycles (n) for a transit vehicle, calculate the cumulative wear factor by finding the harmonic sum of the previous n-1 service intervals. This wear factor helps determine the optimal timing for the next preventive maintenance check based on historical usage patterns.
    

    """
def harmonic_sum(n):
    """
    Given the number of maintenance cycles (n) for a transit vehicle, calculate the cumulative wear factor by finding the harmonic sum of the previous n-1 service intervals. This wear factor helps determine the optimal timing for the next preventive maintenance check based on historical usage patterns.
    

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