<s>[INST] Formula for calculating a progressive sum If we say that initially the addition is $1$, the sum $0$ and $d$ is constant of $5$.
step 1)
  sum = previous sum + addition            sum = 0 + 1 = 1
  addition = previous addition + d         addition = 1 + 5 = 6

step 2)
sum = previous sum + addition            sum = 1 + 6 = 7
addition = addition + d                  addition = 6 + 5 = 11

step 3)
sum = previous sum + addition            sum = 7 + 11 = 18
addition = addition + d                  addition = 11 + 5 = 16

step 4)... the same as above

What I want to achieve here is to find a formula for the calculations shown above from which I can find the sum if I know the rest.
The closest formula found so far is arithmetic progression. But still it's not the one I'm looking for.
What would be the formula for that?
 [/INST] First let's label the sums as a sequence $S_n$ and your "additions" as $A_n$.
It appears that $A_0$, the initial condition, is $1$, and $S_0=0$.
Then we have the system: $$S_{n+1} = S_n + A_n$$ $$A_{n+1} = A_n + D.$$
Here you have $D=5$. We can solve the recurrence for $A_{n+1}$ first, since it does not involve $S_n$.
Well, $A_0=1$, $A_1 = 1+D$, $A_2 = A_1 + D = 1 + 2D$, etc. Thus $A_{n} = 1 + nD$.
Plugging this back into $S_{n+1}$ gives:
$$S_{n+1} = S_n + 1 + nD.$$
Now $S_1 = 0 + 1 + D$, $$S_2 = S_1 + 1 + 2D = (0 + 1 + D) + 1 + 2D = 2 + (1+2)D.$$
$$S_3 = S_2 + 1 + 3D = (2 + (1+2)D) + 1 + 3D = 3 + (1+2+3)D$$ we can see the general form taking shape here:
$$S_{n} = n + (1+ 2+ 3+ \cdots + n)D= n + \frac{n(n+1)}{2} \cdot D.$$
</s>