Your mistake is in the arithmetic. What you think comes out to 2341 really does come out to 240.
$4^5=1024$, $3^5=243$, $2^5=32$, $1024-(4)(243)+(6)(32)-4=1024-972+192-4=1216-976=240$
You forgot that you can have strings with two copies of one letter, two of another, and one of the third. There are $3$ ways to choose which of the letters is used only once, and $5$ ways to place it in the string. There are then $\binom42=6$ ways to choose which two of the remaining four places get the two copies of the first of the other two letters in alphabetical order, for a total of $3\cdot 5\cdot 6=90$ strings, exactly the number that you’re missing.
Added: To do it with generating functions, let $a_n$ be the number of words of length $n$ over a $3$-letter alphabet that use each letter at least once. The first step is to find a recurrence for $a_n$. For brevity call such words good. Each good word of length $n-1$ can be extended to a good word of length $n$ in $3$ different ways, since each of the three letters can be added at the end of the word. In addition, each $(n-1)$-letter word that contains exactly two of the three letters can be extended to a good word in one way, by adding the missing letter. How many of these $(n-1)$-letter words are there? There are $3$ ways to choose which of the three letters is missing, and each of the $n-1$ positions in the word can contain either of the two remaining letters. However, we have to exclude the two possibilities that contain only one of the two letters, so there are $3(2^{n-1}-2)$ such words. This leads us to the recurrence
$$a_n=3a_{n-1}+3(2^{n-1}-2)\tag{1}\;.$$
Clearly $a_0=a_1=a_2=0$ and $a_3=3!=6$. However, if we assume that $a_n=0$ for $n<0$, $(1)$ requires a small adjustment to get $a_0$ and $a_1$ right: as it stands, it yields the values $-9/2$ and $-3$. To correct this, we add a couple of Iverson brackets to get
$$a_n=3a_{n-1}+3(2^{n-1}-2)+\frac92[n=0]+3[n=1]\tag{2}\;.$$
Now multiply through by $x^n$ and sum over $n$ to get the generating function $f(x)$:
$$\begin{align*}f(x)=\sum_na_nx^n&=3\sum_n\left(a_{n-1}+2^{n-1}-2+\frac32[n=0]+[n=1]\right)x^n\\
&=3\left(\sum_na_{n-1}x^n+\sum_n2^{n-1}x^n-2\sum_nx^n+\frac32+x\right)\\
&=3\left(x\sum_na_{n-1}x^{n-1}+\frac12\sum_n(2x)^n-\frac2{1-x}+\frac32+x\right)\\
&=3\left(x\sum_na_nx_n+\frac{1/2}{1-2x}-\frac2{1-x}+\frac32+x\right)\\
&=3xf(x)+\frac32\left(\frac{7x-3}{(1-x)(1-2x)}+2x+3\right)\\
&=3xf(x)+\frac{6x^3}{(1-x)(1-2x)}\;,
\end{align*}$$
so $$(1-3x)f(x)=\frac{6x^3}{(1-x)(1-2x)}\;,$$ and
$$\begin{align*}
f(x)&=\frac{6x^3}{(1-x)(1-2x)(1-3x)}\\
&=x^3\left(\frac3{1-x}-\frac{24}{1-2x}+\frac{27}{1-3x}\right)\\
&=3x^3\left(\sum_nx^n-8\sum_n2^nx^n+9\sum_n3^nx^n\right)\\
&=\sum_n\left(3-3\cdot 2^{n+3}+3^{n+3}\right)x^{n+3}\\
&=\sum_n\left(3-3\cdot 2^n+3^n\right)x^n\;.
\end{align*}$$
Equating coefficients, we finally have $a_n=3^n-3\cdot 2^n+3$.
Best Answer
Consider for example the first term $(4)(26)(25)^3$. There are is more than one interpretation of the $25^3$. Perhaps the $25^3$ is motivated by "once we have chosen the double, say aa, and where it is, the remaining $3$ slots can be filled in $25^3$ ways with non-a's." Under this interpretation of the $25^3$, we are double-counting some possibilities and failing to count some possibilities.
It double-counts, for example, the word aabbx, and many others.
It fails to count the word aaxay, and many others.
But there is another interpretation of the $25^3$. We are say constructing a word that starts with aa. Then if we want to avoid further doubles, we have $25$ choices for the next letter, and for each choice we have $25$ choices for the next letter, and so on.
This does count aabab, which is good. But it fails to count aabbx. So it is not surprising that we get an undercount. It would be interesting to count the double-double words, and address the same issue with strings of type aaabb. With some care, one should get a correct count.