Let $A = \{ a, b, c, d, e, f \}$. How many different 3-letter sequences can be created by the following rule;
1-)Repetition of words is allowed and the sequence must contain the letter "e".
I solved it this question basically considering 3 different cases, which are the case where the sequence contains the letter "e" 3 times, 2 times and 1 time.After that I calculate the number of sequence with the corresponding situation and get the result 91.
However, the way that I used is pretty inefficient if the length of the sequence is much longer, so I'm looking for more "elegant" solutions to this problem.