[Math] Number of 5 letter words with at least one double letter

combinatoricsdiscrete mathematicsprobability

How many 5 letter words have at least one double letter, i.e. two consecutive
letters that are the same?

Answer is:
$26^5 – 26*25^4 = 1,725,126 $

But how can i solve? I don't understand.

The book took all situation $26^5$ and then subtrack $26*25^4$ situation. I think in $26*25^4$ situation that there is some double letter also.

Can you explain the answer more deeply.

I found this : Number of 5 letter words with at least two consecutive letters same but there is no answer for that.

Best Answer

The solution subtracts from total, the number of sequences where no two consecutive letters are the same. Now first letter has $26$ options, second has $25$ ( different from first ) third has again $25$ options ( can be same as first but different from second) same is the case for fourth and fifth letter. Thus solution subtracts $26*25^4$.