Counting 5-letter words that include at least one vowel

"There are five choices for the vowel and $26$ choices for each of the remaining four letters. The certain vowel can be in appear in any of the five spaces."

If the "certain" vowel is in the first position, then your sequence could be "aeghp", and if the "certain" vowel is in the second position, then your sequence could be "aeghp". So you're counting that same sequence twice, and similarly with lots of others.

However, you you subtract the number of sequences with no vowels from the total number of sequences, that does it: the problem described above does not happen. Thus $26^5 - 21^5$.


Hint: Make the numbers smaller and you can see for yourself what's wrong with your erroneous solution.

How many sequences are there of two letters from the alphabet $\{a,b,e\}$ that contain at least one vowel?

Correct solution: There are $3^2=9$ two-letter words, there is $1^3=1$ word with no vowels, so $9-1=8$ words with at least one vowel.

Erroneous solution: There are $2$ choices for the vowel and $3$ choices for the other letter. The vowel can appear in either of the two spaces. Therefore, the number is
$2\times3\times2=12$.

Why, you ask, does doing it with smaller numbers make it any easier to find the mistake? Well, you can actually list the $12$ sequences that you counted with the second method, and then you can see which ones were double-counted.