<s>[INST] Generalize a sum given first elements Given $\rho\in(0,1)$ and $f\colon\mathbb N\to\mathbb R$ defined as
$$\begin{aligned}
f(0)&\mapsto1\\
f(1)&\mapsto2+\rho\\
f(2)&\mapsto3+2\rho+\rho^2\\
f(3)&\mapsto4+3\rho+2\rho^2+\rho^3
\end{aligned}$$
generalize $f$ for an arbitrary $n$ and simplify the summator (if possible)
$$\sum_{n=0}^{\infty_+}(1+r)^{-n}f(n)$$
I think I could simplify the summator but I can't get my head around generalizing $f(n)$. What should be the approach to this? Thanks.
 [/INST] I would like to add one more approach.
Consider
$$
f(n) = (n+1) + n \rho + (n-1) \rho^2 + \cdots + 1 \rho^n = \sum_{k=1}^{n+1} k \rho^{n+1-k}.
$$
Obviously $f(0)= 1$, $f(1) = 2 + \rho$ and so on.
Now make this function a bit more complicated
$$
f(n,x) = (n+1) x^n + n x^{n-1} \rho + (n-1) x^{n-2} \rho^2 + \cdots + 1 \rho^n.
$$
You may see that $f(n,1) = f(n)$.
Let's represent our new function as a derivative and do few transformations
$$
\begin{align}
f(n,x) 
&= \frac{\partial}{\partial x} \left(x^{n+1} + x^{n} \rho + x^{n-1} \rho^2 + \cdots + x \rho^n\right) =\\
&= \frac{\partial}{\partial x} \left( x \left[x^{n} + x^{n-1} \rho + x^{n-2} \rho^2 + \cdots + \rho^n \right] \right) =\\
&= \frac{\partial}{\partial x} \frac{x (x - \rho) (x^{n} + x^{n-1} \rho + x^{n-2} \rho^2 + \cdots + \rho^n)}{x - \rho} =\\
&= \frac{\partial}{\partial x} \frac{x (x^{n+1} - \rho^{n+1})}{x - \rho}
\end{align}
$$
Doing all the boring stuff with derivatives and setting $x=1$, at the end of the day we get
$$
f(n) = \frac{(n+1) - \rho(n+2) + \rho^{n+2}}{(\rho - 1)^2}
$$
One may check that
$$
f(0) = \frac{1 - 2\rho + \rho^2}{(\rho - 1)^2} = 1,
$$
$$
\begin{align}
f(1) &= \frac{2 - 3\rho + \rho^3}{(\rho - 1)^2}
      = \frac{2 - 4\rho + 2\rho^2 + \rho^3 - 2\rho^2 + \rho}{(\rho - 1)^2} =\\
     &= \frac{2(1-\rho)^2+ \rho(\rho - 1)^2}{(\rho - 1)^2}
      = 2 + \rho
\end{align}
$$
and so on.
</s>