In year $n$ you receive $i(1+r)^{n-1}$, which is worth $i(1+r)^{n-1}(1-d)^{n-1}$. This is a geometric series with sum $\frac {i}{1-(1+r)(1-d)}$ assuming $d \gt r$. Otherwise the sum diverges to $\infty$. This assumes you start counting with this year as year $1$. You should check for offsets of $1$ depending on whether the income is at the start or end of the year and when the increase/discount is applied.