Question
Solve Recurrence Relation of $T(n)=4T(n-2)+2$
Base case-: $T(1)=1,T(2)=2$
My Approach/solution
$$T(n)=4T(n-2)+2$$ $$T(n-2)=4T(n-4)+2 \tag{1}$$ $$T(n-4)=4T(n-6)+2 \tag{2}$$
Using $(1)$ and $(2)$ in my equation $$\begin{align*} T(n)&=4\cdot (4T(n-4)+2)+2\\ &=4^{2}\cdot T(n-2\cdot 2)+2\cdot 4^{1}+2\cdot 4^{0}\\ &=4^{2}\cdot(4T(n-6)+2)+2\cdot 4^{1}+2\cdot 4^{0}\\ &=4^{3}\cdot T(n-2\cdot 3)+2\cdot 4^{2}+2\cdot 4^{1}+2\cdot 4^{0}\\ \vdots \\ &=4^{k}\cdot T(n-2\cdot k)+2\cdot 4^{k-1}+...+2\cdot 4^{2}+2\cdot 4^{1}+2\cdot 4^{0} \end{align*}$$
Substituing $T(n-2\cdot k)$ by $2$, i.e $T(2)=2$ $$n-2\cdot k=2 \Rightarrow k=\frac{n-2}{2}$$
So our equation will look like
$$\begin{align*} T(n)&=2\cdot 4^{k}+2\cdot 4^{k-1}+...+2\cdot 4^{2}+2\cdot 4^{1}+2\cdot 4^{0}\\ T(n)&=2\cdot \left(4^{0}+4^{1}+4^{2}+...+4^{k-1}+4^{k}\right)\\ T(n)&=2\cdot \left(4^{0}\cdot \frac{(4^{k+1}-1)}{4-1}\right) \end{align*}$$
$k=\frac{n-2}{2}$
$$\begin{align*} T(n)&=2\cdot \left(\frac{(4^{k+1}-1)}{4-1}\right)\\ T(n)&=2\cdot \frac{2^{n}-1}{3} \end{align*}$$
Is it correct? Also if it is correct, can anyone hint me another approach as it is bit lengthy.
Thanks!