So here is the Problem :-
If $(x^2 - x - 1)^n = a_{2n}x^{2n} + a_{2n - 1}x^{2n - 1} + \cdots + a_2x^2 + a_1x + a_0$, then find the value of $a_0 + a_2 + a_4 + \cdots + a_{2n}$ .
I don't know how to factorise $(x^2 - x - 1)^n$ and I was only able to solve this by substituting $n = 1$, where that would give $$(x² - x - 1) = a_2x^2 + a_1x + a_0.$$
This immediately gives the answer as $0$ . But I want a solution for $n$ itself, but not substituting $n$ as any number. Can anyone give me an idea of it ?
Substituting $x=1$ into the equality we have $(-1)^n=a_0+a_1+a_2+a_3+\ldots+a_{2n-1}+a_{2n}$, Substituting $x=-1$ into the equality we have $1=a_0-a_1+a_2-a_3+\ldots-a_{2n-1}+a_{2n}$,
Adding these two, we get $2(a_0+a_2+\ldots+a_{2n-2}+a_{2n})=(-1)^n+1$
Therefore, $a_0+a_2+\ldots+a_{2n-2}+a_{2n}=\frac{(-1)^n+1}{2} =\begin{cases} 1, & \text{if $n$ is even} \\ 0, & \text{if $n$ is odd} \end{cases} $