So say I have a y = 12. Then I'd like to compute:
(x*12)+(x*11)+(x*10)+(x*9)+(x*8)+(x*7)+(x*6)+(x*5)+(x*4)+(x*3)+(x*2)+(x*1)
or say I have y = 4. Then I'd like to compute:
(x*4)+(x*3)+(x*2)+(x*1)
I'd like to know if there is a name for this type of equation and if there is a simpler way to write it. The reason I'd like to know is because I'm trying to do this in Excel with a y of 3,652 (and x is a cell reference). I wrote a python script that writes the formula for me but it crashes excel when I try to paste a forumula that long. Instead I'm looking for a cleaner way to do this type of math so I can translate that to Excel.
If you factor $x$ out of your algorithm, you get
$$x(y+(y-1)+(y-2)... + \ 1)$$
What's in the brackets is an arithmetic series. The sum is given by the formula $$\frac{n(a_1+a_n)}{2}$$
where $n$ is the number of terms, $a_1$ is the first term, and $a_n$ is the $n$th term. If you plug the values of your series into the formula, you get
$$\frac{y(y+1)}{2}$$
Multiplying this by $x$ will give you the algorithm you want:
$$\frac{xy(y+1)}{2}$$