Can a sum of a finite number of exponentially growing numbers be calculated as a function of the growth rate and the number of growths

exponential functiongeometric seriessequences-and-series

This is a question based on the exponential growth pattern of a game mechanic in World of Warcraft: The Heart of Azeroth item in the game has a level that can be increased by gathering Azerite, with each level requiring roughly 1.3 times as much Azerite as the one before. I'm trying to calculate how much Azerite I have left to gather to get from my current level (40) to the max level (50) when I want to start playing again, so effectively $$X + 1.3X + 1.3^2 X + 1.3^3 X + \ldots + 1.3^{10}X$$

I'm trying to figure out a formula that I can use so I don't have to manually add these numbers (even though deriving that formula would probably be slower than just adding the 10 numbers manually). Essentially, given a start Azerite requirement of X, a rate of increase of p and n numbers to sum, is there a simple formula to calculate this exponential sum without having to calculate and add each number? I assume there is one, but I haven't done any real math since high school so I have no idea where to start.

Best Answer

How to get the formula...

let $S$ be the sum of the series. $$S=x+px+p^2x+p^3x+ \dots + p^nx$$ Then $$pS = px+p^2x+p^3x+ \dots + p^nx + p^{n+1}x$$ $$S-pS = (1-p) S = x - p^{n+1}x$$

Therefore, $$S = \frac{x(1-p^{n+1})}{1-p}$$

Related Question