$$\left(1 + x + x^2\right)^n = a_0 + a_1x + a_1x^2 + ......... + a_{2n}x^{2n} \Rightarrow a_1 + a_3 + ....... + a_{2n -1} =$$
$$\left(1 + x + x^2\right)^n = a_0 + a_1x + a_2x^2 + ......... + a_{2n}x^{2n}$$
Put x = 1
$$\left(1 + 1 + 1\right)^n = a_0 + a_1 + a_2 + .........+ a_{2n-1}+ a_{2n}$$
$$a_0 + a_1 + a_2 + .........+ a_{2n-1}+ a_{2n} = 3^{n}$$ ....... (1)
Put x = -1
$$\left(1 - 1 + 1\right)^n = a_0 - a_1 + a_2 - .........- a_{2n-1}+ a_{2n}$$
$$a_0 - a_1 + a_2 - .........- a_{2n-1}+ a_{2n} = 1$$ ....... (2)
From (1) and (2):
$$(a_0 + a_1 + a_2 + .........+ a_{2n-1}+ a_{2n})-(a_0 - a_1 + a_2 - .........- a_{2n-1}+ a_{2n}) = 3^{n} - 1$$
$$2a_1 + 2a_3 + 2a_5 + .........+ 2a_{2n-1} = 3^{n}-1$$
$$a_1 + a_3 + a_5 + .........+ a_{2n-1} = \frac{3^{n}-1}{2}$$
Create a FREE account and get: