I'm not great with math so please bear with me.
I have two sequences of numbers: $$ 4,3,2,1\\ 1,2,3,4 $$ I aggregate them using addition: $$ 4+3+2+1 = 10\\ 1+2+3+4 = 10 $$ I aggregate them using multiplication: $$ 4*3*2*1 = 24\\ 1*2*3*4 = 24 $$ They obviously equal the same. However, I want 4,3,2,1 to have a higher value than 1,2,3,4 when I sum them. This is because I want the earlier numbers to have a greater weight compared to the later numbers. So a sequence beginning with 4 will result in a sum greater than a sequence beginning with 1. Unfortunately I cannot use index of the sequence as the weight. The sum will be done incrementally without the index.
Using addition and multiplication results in a linear sum. I guess I need to use a non-linear function to achieve what I want? If so I wouldn't know what one to use.
I hope that makes sense.
EDIT: I do not have access to all the numbers in the sequence at the same time. All I have is the current number in the sequence (the previous ones and the next ones are unknown) and the current sum so far. ie, for 4,3,2,1 when 2 arrives I want to increment my current sum (say my current sum is 7 if I were using addition)