On the number of words of $N=3 \,M$ letters with a three-letter alphabet
Pablo Serra
TL;DR
The paper solves the classic counting problem of the number of words of length $N=3M$ formed from a three-letter alphabet by categorizing letter-count vectors $(n_1,n_2,n_3)$ according to residues modulo $3$ into four cases A–D. It derives multinomial-based recurrence relations for the associated counts $C_A(k)$, $C_B(k)$, $C_C(k)$, and $C_D(k)$, then decouples these recurrences to obtain explicit closed-form expressions. The key results are $C_A(k)=3^{3k-2}+(1+(-1)^k)i^k 3^{3k/2-1}$, $C_B(k)=3^{3k+1}+3^{3k/2+1}igl(rac{1+(-1)^k}{2}i^k+rac{1-(-1)^k}{2 oot 3 elax sqrt{3}}i^{k-1}igr)$, $C_C(k)=3^{3k+4}+rac{1-(-1)^k}{2}i^{k-1}3^{(3k+5)/2}+rac{1+(-1)^k}{2}i^k3^{(3k/2+2)}$, and $C_D(k)=2 imes3^{3k+2}$, with corresponding generating functions all geometric. These results yield new sums of trinomial coefficients and connect to OEIS sequences, illustrating a complete analytic treatment via recurrences and generating functions.
Abstract
In this paper we address the well-known problem of counting the number of $3M$-letter words that can be formed from a three-letter alphabet by decomposing it into four possible cases based on its remainder when divided by three. The solution to the problem also gives us some sums of trinomial coefficients.
