Consider the following recurrence relation describing a function $F$ whose domain is the set of all nonnegative integers:
$$F(0) = 2$$
$$F(N) = 3F(N-1) + 5; \quad N > 0$$
Question: How to give a closed-form representation for $F$?
Consider the following recurrence relation describing a function $F$ whose domain is the set of all nonnegative integers:
$$F(0) = 2$$
$$F(N) = 3F(N-1) + 5; \quad N > 0$$
Question: How to give a closed-form representation for $F$?
On
HINT: $$f_1=3f_0+5$$ $$f_2=3^2f_0+3\cdot 5+5$$ $$f_3=3^3f_0+3^2\cdot 5+3\cdot 5+5$$ $$f_4=3^4f_0+3^3\cdot 5+3^2\cdot 5+3\cdot 5+5$$ $$...$$ $$f_n=3^n f_0+3^{n-1}\cdot 5+3^{n-2}\cdot 5+...+3\cdot 5+5$$
On
Hint: divide $\,f_n = 3f_{n-1} +5\,$ by $\,3^n\,$, then telescope:
$$\dfrac{f_n}{3^n} = \dfrac{f_{n-1}}{3^{n-1}} + 5 \cdot \dfrac{1}{3^n}=\dfrac{f_{n-2}}{3^{n-2}} +5 \cdot \left(\dfrac{1}{3^{n-1}} +\dfrac{1}{3^n}\right)=\ldots=\dfrac{f_0}{3^0}+ 5 \cdot \left(\dfrac{1}{3}+ \ldots\dfrac{1}{3^{n-1}} +\dfrac{1}{3^n}\right)$$
Hint: Try to expand: $$F(n) = 3(3F(n-2) + 5) + 5 = 3^2 F(n-2) + 3\times 5 + 5 = 3^2(3F(n-3) + 5) + 3\times 5 + 5 = 3^3 F(n-3) + 3^2\times 5 + 3\times 5 + 5 = \cdots = 3^{n}F(0) + (\sum_{i=0}^{n-1} 3^i) \times 5 = 2\times 3^n + 5 \times \frac{3^n - 1}{2} = (2 + \frac{5}{2})\times 3^n - \frac{5}{2} = \frac{9}{2}\times 3^n-\frac{5}{2} = \frac{9\times 3^n - 5}{2} = \frac{3^{n+2} - 5}{2}$$