How to calculate the sum of an exponential function

104 Views Asked by At

I have a function $c = xy^z$ that calculates the price of a single unit, where:

  • $c$ = The cost of the unit
  • $x$ = The base cost of the unit
  • $y$ = The percentual cost increment for the next unit
  • $z$ = The amount of units currently bought

Now, I want to rewrite this fuction so it calculates the sum of the price of multiple units, so you can see what the costs are for buying three units at once.

For example:

$c = 10(\frac{108}{100})^{50} ... 10(\frac{108}{100})^{52}$

I could just repeat the existing function while incrementing $z$ but if possible I would like it to be a single function.