TITLE: count the number of words with length $n$ using $a,b,c$ that contain odd number of $a$'s.
QUESTION [5 upvotes]: Find the words with length $n$ using $a,b,c$ that contain odd number of $a$'s.
My attempt:let $f_n$ be the answer of the question and $g_n$ the answer of the same question with even number of $a$'s.We have:
$f_n=2f_{n-1}+g_{n-1}$
$g_n=2g_{n-1}+f_{n-1}$
So we get:
$g_n-f_n=g_{n-1}-f_{n-1}=\dots =g_1-f_1=1$
$f_n+g_n=3(f_{n-1}+g_{n-1})$
So $2f_n+1=3(2f_{n-1}+1)$ and we have $f_n=3f_{n-1}+1$
But the book gave the answer $f_n=4f_{n-1}-3f_{n-2}$ So I need an answer containing that answer.

REPLY [3 votes]: This combinatorial argument might be satisfactory:
Let $S$ be the set of all strings that have odd number of $a$ s.
Then the number of strings in $S$ that have $a$ in the first as well as the second place - $f_{n-2}$.
Other strings in $S$ have either $b$ or $c$ in the first place or the second place: 
Number of strings in $S$ that have either $b$ or $c$ in the first place - $2f_{n-1}$.
Number of strings in $S$ that have either $b$ or $c$ in the second place - $2f_{n-1}$.
Number of strings in $S$ that have either $b$ or $c$ in both 
first and second place - $2\times2\times f_{n-2} = 4f_{n-2}$.
Using inclusion-exclsion principle, number of strings in $S$ that have either $b$ or $c$ in first or second place - $2f_{n-1}+2f_{n-1}-4f_{n-2} = 4(f_{n-1}-f_{n-2})$.
Thus total number of strings in $S$ - $f_n = 4(f_{n-1}-f_{n-2}) + f_{n-2} = 4f_{n-1}-3f_{n-2}$.