Counting loop - formula for field from previous iteration

I’m using a counting loop. I want to create a formula using the output values from the previous iteration. What is the formula for this to use in math formula / column expression?

Is there any reason for the counting loop? The recursive loop can take the result from the previous iteration.
br

Thanks you I will try that