Is there a way to get the partial sum of the following series that combines both an arithmetic and geometric series:
$$a_1=k$$ $$a_n=a_{n-1}\cdot q+d$$
So for example
$$a_3=((a_1\cdot q+d)\cdot q+d)\cdot q+d$$
The series would be applicable to a population in which the birth rate is $q$ and the migration is $d$, but also to a bank account with interest and deposits and so on.
I am aware one can of course manually sum each term up until the last, but since the arithmetic and geometric series have such clean partial sum formulas, this one might have one as well. But I don't know whether this kind of series has a name.
If you try with the first terms you can see a clear pattern.
Start by $a_0=a$. Then $$a_1= qa+d \\ a_2 = q^2a+qd+d \\ a_3= q^3a + q^2d + qd+d \\ a_4= q^4a + q^3d+q^2d + qd+d$$ and so on. In general the pattern is $$a_n = q^na + d(q^{n-1}+ \dots + 1) = q^na + d \cdot \frac{q^n-1}{q-1}$$