TITLE: Find the number of tuples consisting of $0, 1$ and $3$
QUESTION [6 upvotes]: How can I find the number of tuples $(k_1, k_2, ...,k_{26})$ such that each $k_i$ equals $0, 1$ or $3$ and $k_1 + k_2 + ... + k_{26} = 15$.
I can reduce this problem to finding the coefficient of $x^{15}$ in expression $(1 + x + x^3)^{26}$, but I do not now any simple way to do it.

REPLY [2 votes]: Okay, so you have options: Lets say you have $a$ 1s and $b$ 3s, and the remainder are zeros.  So you have that $a+3b = 15$.  This gives the following collection of $(a,b)$ pairs as solutions:
$$ (15,0), (12, 1), (9,2), (6,3), (3,4), (0,5),$$
or equivalently, $(15-3k, k)$ for $0 \leq k \leq 5$.
Now from a pair $(a,b)$ you obtain solutions to the original equation by choosing, from the 26 positions, $a$ places to put a 1, and from the remaining $26-a$ positions, $b$ places to put a $0$.  In other words, you have contribution of ${26 \choose a}{26-a \choose b}$ from the pair $(a,b)$.  This gives a total of
$$ \sum_{k=0}^{5} {26 \choose 15 -3k}{26-3k \choose k}.$$
This gives the same result as in the answer of Markus.