
    Design an algorithm for a social media platform that calculates the total influence score of a user's social connections, where each connection level has diminishing impact. Starting with the total number of connections, each subsequent level of connection reduces the impact by 2, continuing until there are no more meaningful connection levels to consider. For example, if a user has 7 connections, the influence score would sum up as: 7 (direct connections) + 5 (secondary connections) + 3 (tertiary connections) + 1 (quaternary connections). This score will be used to prioritize content recommendations, with higher scores indicating broader social reach and influence potential.
    

    
def sum_series(n):
    """
    Design an algorithm for a social media platform that calculates the total influence score of a user's social connections, where each connection level has diminishing impact. Starting with the total number of connections, each subsequent level of connection reduces the impact by 2, continuing until there are no more meaningful connection levels to consider. For example, if a user has 7 connections, the influence score would sum up as: 7 (direct connections) + 5 (secondary connections) + 3 (tertiary connections) + 1 (quaternary connections). This score will be used to prioritize content recommendations, with higher scores indicating broader social reach and influence potential.
    

    """
def sum_series(n):
    """
    Design an algorithm for a social media platform that calculates the total influence score of a user's social connections, where each connection level has diminishing impact. Starting with the total number of connections, each subsequent level of connection reduces the impact by 2, continuing until there are no more meaningful connection levels to consider. For example, if a user has 7 connections, the influence score would sum up as: 7 (direct connections) + 5 (secondary connections) + 3 (tertiary connections) + 1 (quaternary connections). This score will be used to prioritize content recommendations, with higher scores indicating broader social reach and influence potential.
    

    """
    if n < 1:
        return 0
    else:
        return n + sum_series(n - 2)