The Challenge I am facing is combining two formulas based for a game on command and Conquer. The Silo creates continuous productivity when left alone for a while with storage. Only looking at the upgrade and selling cost. In this case "tiberium"
Trying to figure out about:
how much each "silo" costs per level
how much total spent
how much it sells for at that level
etc.
found two essential formulas:
Partial Sum
Exponential function
Where Partial Sum is:
y=(n(n+1))/2
and Exponential formula
y=ab^x
where
y is the output.
a and b refer to the climbing curve of cost
and x which is the silo's level
n denotes infinite level of the silo base
For Example:
Upgrade Silo lv 9 to 10 costs 8800
Upgrade Silo Lv 8 to 9 costs 3200
The costs are the a and b where levels is the exponent power
Is this the correct way of writing the total cost of the silo at its current level? (forgive me if i dont know math shortcuts)
y=( ab^n ( ab^n + ab^1 ) ) / ab^2
If not, how do i correctly write the exponential function with the partial sum?