# How many three-letter words have at least two letters the same?

I know that the answer is $1976$, from $26^3-26\cdot25\cdot24$

However, I had a different way of doing it, which is by saying that the the two letters that are the same have $26$ possibilities, and the remaining letter also has $26$ possibilities, and there are $3$ possible distinct positions of the letters, AAB, BAA, and ABA with A representing the two letters that are the same and B representing the third letter, which leads me to $26^2\cdot3=2028$

My question is, where am I going wrong with my reasoning?

• The remaining letter has now 25 possibilities. And the word AAA... – dan_fulea May 29 '18 at 14:51
• Try counting with an alphabet of only two letters first and compare the approaches. – Jair Taylor May 29 '18 at 16:28

If the third letter is the same as the two letters that are the same, then there are not $3$ different orderings $AAB$, $ABA$, and $BAA$, but just one: $AAA$
So, for every such case (and clearly there are $26$ cases of $AAA$), you are counting thrice what should be counted just once. Hence, you overcount by $26 \cdot 2 = 52$, which is exactly the difference between $2028$ and $1976$
To use your method, you need to subtract $2 \cdot 26$ -- $26$ words which are three letters the same, and $2$ because you counted them thrice and you want to count them only once. This gives you $2028 - 2 \cdot 26 = 1976$, matching the answer from the first method.