How can I transform a formula describing a curve (a discrete series) to the standard formula for a geometric progression?
(Note: Maths is still very much a foreign language to me. I could be using any of these terms incorrectly. I could be using mathematical notation incorrectly. I could be using MathJax incorrectly. I am trying to describe computer code in mathematical language, and may have any of the translation wrong.)
The existing function computes a sum that is expressed as (I think) the following:
$$ \sum_{k=1}^{n} ({x}+({y}({k-1})^{z})) $$
$n$ is an input to the function. It is always an integer > 0.
$x$, $y$, $z$ are known (static) parameters in the function.
- In this specific program, $z$ is typically a negative number, such as $-1.1$.
The function produces the sum of the series, for a given $n$.
Currently I have a function that does this via iterative addition. I want instead to use the sum of geometric series formula:
$$ \sum_{k=1}^{n} ar^{k-1} = \frac{a(1-r^{n})}{1-r} $$
What I can't figure out is how to transform this so that:
The formula meets the geometric series formula, so that $x$, $y$, $z$ are encapsulated instead as appropriate values for $a$ and $r$.
The $n$ retains the same value i the geometric series formula, so that existing users of this function can feed the same $n$ and get the same result.
If there's some standard transformations that will make this easier, I simply don't know them. I can noodle around in a spreadsheet and watch the plotted results change for n=[1..1000000], but don't understand the mathematical basis of those effects.
How (preferably explaining what the transformation means) do I transform the $x$, $y$, $z$ from the initial expression, to the $a$ and $r$ of the geometric series expression?
Synthesising from @Claude-Leibovici and @Mark-S:
This is not a Geometric Series since the base is changing in each term of the sum, not the exponent. So, the expression cannot be transformed to the standard geometric progression.