Suppose that there is some equity which yields revenues, when locked in a revenue program.
This equity costs $X$ dollars per unit, and gives $Y$ dollars per unit per second, while the program duration is $Z$ seconds.
Whenever a sufficient amount of revenues has accumulated, it is immediately converted into a new unit, which is then added to the program, producing yet even more revenues.
So when locking $N$ units in that revenue program, I ultimately get back $N$ or more units, and up to $X$ minus epsilon dollars (since more than that would be converted into units).
For example, if:
- $X = 60$ (each unit costs $60$ dollars)
- $Y = 0.5$ (each unit yields $0.5$ dollars per second)
- $Z = 80$ (the program duration is $80$ seconds)
- $N = 4$ (locking $4$ units in the program)
Then the flow would be:
+------+---------+---------------------------------------+------------------------+
| time | elapsed | calculation | total equity |
+------+---------+---------------------------------------+------------------------+
| 0 | | | 0 dollars and 4 units |
| 30 | 30 | 4 * 0.5 * 30 = 60 dollars and 4 units | 0 dollars and 5 units |
| 54 | 24 | 5 * 0.5 * 24 = 60 dollars and 5 units | 0 dollars and 6 units |
| 74 | 20 | 6 * 0.5 * 20 = 60 dollars and 6 units | 0 dollars and 7 units |
| 80 | 6 | 7 * 0.5 * 6 = 21 dollars and 7 units | 21 dollars and 7 units |
+------+---------+---------------------------------------+------------------------+
What general purpose formula can I use in order to calculate the bottom line?
For example, in this case, given:
- $X = 60$
- $Y = 0.5$
- $Z = 80$
- $N = 4$
I want to compute the two outputs of 21 dollars and 7 units.
I feel like I should be using some sort of 'compound interest' here, but I'm not really sure how to achieve that.
Thank you very much.
UPDATE:
I believe that in the example above, I need to solve $\sum\limits_{n=4}^{k}\frac{60}{0.5n}=80$ for $k$.
Then the total number of units is $\lceil{k}\rceil$, and the total number of dollars can probably be easily computed following that.
So the general formula to solve for $k$ would be:
$$\sum\limits_{n=N}^{k}\frac{X}{Yn}=Z$$
Is that correct, and if yes, then is there a straightforward (non-iterative) way for solving it?
As Wolfram Alpha gave it $$\sum\limits_{n=N}^{k}\frac{X}{Yn}=Z \implies \psi (k+1)=\psi (N)+\frac{Y Z}{X}$$ Using harmonic numbers instead $$H_k=H_{n-1}+\frac{Y Z}{X}=A$$
Assuming that $k$ could be large, we could use $$H_k=\log (k)+\gamma +\frac{1}{2 k}+O\left(\frac{1}{k^2}\right)$$ and neglecting the higher order terms $$k=-\frac{1}{2 W\left(-\frac{1}{2}e^{\gamma -A}\right)}\tag 1$$ where $W(.)$ is Lambert function.
You also could find very good approximations based on series (have a look at sequences $A118050$ and $A118050$ in $OEIS$ for the coefficients).
You can also have a look here.
For illustration, using $(1)$
$$\left( \begin{array}{ccc} A & \text{estimate} & \text{solution} \\ 1.5 & 1.94619 & 2.00000 \\ 2.0 & 3.61240 & 3.63868 \\ 2.5 & 6.31967 & 6.33390 \\ 3.0 & 10.7654 & 10.7735 \\ 3.5 & 18.0860 & 18.0907 \\ 4.0 & 30.1505 & 30.1533 \\ 4.5 & 50.0385 & 50.0401 \\ 5.0 & 82.8265 & 82.8275 \end{array} \right)$$