I want to find a recursive formula to determine the amount of different words that you can build by taking n letters from the set {a,b,c}. Also, there needs to be atleast on occurence of two consecutive a's in the word. For example, baac is a valid word, but abac is not.
How would you approach this?