Representation of the original problem -
$\displaystyle \sum\limits_{i=1}^{7} x_i = 15, 0 \leq x_i \leq 3$
To make the working easier, we now define a variable $y_i = 3 - x_i$ and we derive $0 \leq y_i \leq 3$ from the original constraint. Please note that as the new variable $y_i$ varies from $0$ to $3$ for $i \in (1,7)$, the solutions directly map to permissible solutions of the original problem.
So we rewrite the problem as,
$\displaystyle \sum\limits_{i=1}^{7} (3-y_i) = 15, 0 \leq y_i \leq 3 \ $ or, $\displaystyle \sum\limits_{i=1}^{7} y_i = 6, 0 \leq y_i \leq 3$
Without restriction, we have ${{7 + 6 - 1} \choose {7-1}} = 924$ solutions.
Now for exclusions,
- There are $7$ combinations if one of the numbers is $6$.
- There are $7 \cdot 6 = 42$ combinations if one of the numbers is $5$ (one of the other numbers is $1$)
- If one of the numbers is $4$, we either have other number as $2$ which is $7 \cdot 6 = 42$ combinations or we have two other numbers that are $1$ each. That is $7 \cdot {6 \choose 2} = 105$ combinations.
So total number of valid solutions $ = 924 - (7 + 42 + 42 + 105) = \fbox{728}$.