I don't have a strong math background, so I'm not sure I phrased the question well. I have a series of functions:
f(1,C,n) = C + Cn
f(2,C,n) = 2C + 3Cn + Cn^2
f(3,C,n) = 3C + 6Cn + 4Cn^2 + Cn^3
f(4,C,n) = 4C + 10Cn + 10Cn^2 + 5Cn^3 + Cn^4
f(5,C,n) = 5C + 15Cn + 20Cn^2 + 15Cn^3 + 6Cn^4 + Cn^5
f(6,C,n) = 6C + 21Cn + 35Cn^2 + 35Cn^3 + 21Cn^4 + 7Cn^5 + Cn^6
....and so on
I'm trying to determine the function for f(t,C,n) based on the above. But I don't know how to deal with the exponents, specifically that there is always some amount of Cn^(t), Cn^(t-1), Cn^(t-1) and so on...
You can easily pull out C and express a multiple of C in terms of n:
f(1,C,n) = (1 + n)C
f(2,C,n) = (2 + 3n + n^2)C
f(3,C,n) = (3 + 6n + 4n^2 + n^3)C
f(4,C,n) = (4 + 10n + 10n^2 + 5n^3 + n^4)C
f(5,C,n) = (5 + 15n + 20n^2 + 15n^3 + 6n^4 + n^5)C
f(6,C,n) = (6 + 21n + 35n^2 + 35n^3 + 21n^4 + 7n^5 + n^6)C
But I'm not sure if that helps... So I'm curious about:
1) A specific answer to "what would f(t,C,n) look like?"
AND/OR
2) Is there a general rule or method that would help me solve this? What do you when a series starts to look like:
x|f(x)
1|n
2|n + n^2
3|n + n^2 + n^3
4|...
In response to @david-k 's answer, I generated the functions as follows:
They are meant to represent investing an annual contribution (C) into an investment with an annual return (n) for a given number of years (t). (I know there are existing tools to calculate this, but I wanted to understand how to get there.) f(t,C,n) is total the amount you would have after t years.
So I started with a base case of 1 year. After a year, you'd have the money you put in (C) and the interest on that money (Cn). So
f(1) = C + Cn
or
f(1) = (1 + n)C
After the next term, you have what ever you had after the first term (C+Cn) plus an additional C (the new money you added) plus all of that times the return (n).
f(2) = (C + Cn + C) + (C + Cn + C)n
= 2C + Cn + (2C + Cn)n
= 2C + Cn + 2Cn + Cn^2
= 2C + 3Cn + Cn^2
= (2 + 3n + n^2)C
So each f(t) was figured out by taking the function for f(t-1), adding C to it, then adding all of that (f(t-1)+C) multiplied by n. (Which is the same as saying that f(t) = (f(t-1)+C) * (1 + n) but I didn't see that until later.)