I am trying to write an equation but can't seem to remember far enough back in school to figure out how to do it. The example I will give below is simplified and not real world in terms of actual numbers or products. That being said, it should outline my need in order to come up with a formula that could be applied to any number considering the same scenario. Hopefully this is clear.
Let's say an apple costs $2 for one. I want to buy 100 apples, but they have to be purchased 10 at a time and every time I purchase 10, the price of one apple increases by $1.50. I want to be able to calculate my total cost for all 100 apples.
If you work this out manually: 2*10 + (2+1.5)*10 + (3.5+1.5)*10 + (5+1.5)*10 + (6.5+1.5)*10 + (8+1.5)*10 + (9.5+1.5)*10 + (11+1.5)*10 + (12.5+1.5)*10 + (14*10)= $875
I just don't know how to represent all of that into a formula
I would like to be able to substitute any value for "starting cost", "increase in cost", "number to be purchased at one time", and "total number to be purchased" and still calculate the total cost.
Thanks in advance for the help!