I need to solve this system of linear equations:
$k_0=1+k_1$
$k_1=1+\frac{1}{3} k_1 +\frac{2}{3} k_2$
$k_2=1+\frac{1}{3} k_1 +\frac{2}{3} k_3$
$k_3=1+\frac{1}{3} k_1 +\frac{2}{3} k_4$
$...$
$k_{N-1}=1+\frac{1}{3} k_1 +\frac{2}{3} k_N$
$k_N=0$
I need to find a general solution for $k_0$ all $N$.
The system is equivalent to:
$k_0=1+k_1$
$k_i=1+\frac{1}{3} k_1 +\frac{2}{3} k_{i+1} \;\;\; i\in 1,2,3,...,N-1$
$k_N=0$
that is:
$k_0=1+k_1$
$k_i=\frac{3}{2} k_{i-1} -\frac{1}{2} k_1-\frac{3}{2} \;\;\; i\in 2,3,...,N \;\;\; [1]$
$k_N=0 \;\;\; [2]$
As far as I know, $[1]$ and $[2]$ is a linear unhomogenous recurrence relation with constant coefficients of order 1 with initial condition $k_N=0$ . The unhomogenous term is $f(n)=-\frac{1}{2} k_1-\frac{3}{2}$.
Solving this recurrence relation gives as general solution:
$k_i=A \left ( \frac{3}{2} \right )^i+3+k_1 \;\;\; [3]$
with $A=\left ( \frac{2}{3} \right )^N \left ( -3-k_1 \right )$
Now I don't know how to proceed. As I said, I need to find $k_0$, but the solution $[3]$ is just for $i\in 2,3,...,N$. How can I use $[3]$ to find a general solution for $k_0$ for all $N$? Thank you.