formula or equation for the constant remaining quantity in a continuous half-life with replenishment? I have observed that when I recursively make half-life calculations with a constant replenishment for a constant time between doses, the remaining quantity tends to stabilize to a certain value.
Hence, I surmised that given
$N_i$ - the starting dose,
$N_d$ - the replenishing dose (which may or may not be equal to N_i),$t_d$ - the time between doses, and
$t_{0.5}$ - the half-life,
that there would be a general formula for finding out at what value will the remaining quantity stabilize, N_f.
An example would be:
$N_{i0}=N_d=0.8$
$t_d = 1.2$
$t_{0.5}=2$
$N_{i1}=N_{i0}*0.5^{t_d/t_{0.5}}$
$\quad \ \ =0.8*0.5^{1.2/2}$
$\quad \ \ =0.5278...$
$N_{i2}=(N_{i1}+N_d)*0.5^{t_d/t_{0.5}}$
$\quad \ \ =(0.5278...+0.8)*0.5^{1.2/2}$
$\quad \ \ =0.876...$
...
I could keep on punching the same equation to a calculator until
...
$N_f=(N_{f-1}+N_d)*0.5^{t_d/t_{0.5}}$
$\quad \ =(1.551...+0.8)*0.5^{1.2/2}$
$\quad \ =1.551...$
But would it be possible to come up with an equation that leads to the same $N_f$?
 A: Let the starting dose be $A$, the replenishing dose be a constant $a$, the time between doses be a constant $T$ and the half life be $\tau$.
At any time $t$, the remaining dose is
$$A (0.5)^{t / \tau} + a \sum_{k = 1}^{\lfloor t / T \rfloor} (0.5)^{(t - k T) / \tau}$$
We can factor out a factor of $(0.5)^{t / \tau}$ to get the remaining dose equal to
$$(0.5)^{t / \tau} \left( A + a \sum_{k = 1}^{\lfloor t / T \rfloor} (0.5)^{-k (T / \tau)} \right)$$
We only consider only integer multiples of $T$, with $t / T \ge 1$; i.e., we are only concerned with what happens immediately following a replenishing dose. The summation becomes a finite geometric series with $t / T$ terms, where the first term and common ratio are both $2^{T / \tau}$. The value is $2^{T / \tau} \left( \frac{2^{t / \tau} - 1}{2^{T / \tau} - 1} \right) = \frac{2^{t / \tau} - 1}{1 - 2^{-T / \tau}}$.
Let's consider what happens when time becomes very long compared to to the half life; i.e., as $t / \tau \to \infty$. First, it is clear to see that the effect of the initial dose $A$ vanishes, as one would expect. After some simplification, the expression for the limit of the remaining quantity becomes
$$\lim_{t / \tau \to \infty} a \left( \frac{1 - 2^{-t / \tau}}{1 - 2^{-T / \tau}} \right) = \boxed{\left( \frac{1}{1 - 2^{-T / \tau}} \right) a}$$
If you instead wanted the steady value of the quantity right before the replenishing doses, simply subtract $a$ to get $\left( \frac{2^{-T / \tau}}{1 - 2^{-T / \tau}} \right) a$.
Note that if the replenishment period is "short"; i.e., $T / \tau \ll 1$, the steady-state quantity (either before or after each dose) will be a large multiple of the replenishing dose $a$. On the other hand, if the replenishment period is "long"; i.e., $T / \tau \gg 1$, we have the situation where the substance is basically depleted between each dose, and the quantity swings between $\approx 0$ before each dose to $\approx a$ after each dose.
