1. **Problem statement:** Find the number of 7-digit integers whose digits are only 1, 2, or 3 and whose digits sum to 10.
2. **Understanding the problem:** We want to count sequences $(d_1, d_2, \ldots, d_7)$ where each $d_i \in \{1,2,3\}$ and $\sum_{i=1}^7 d_i = 10$.
3. **Reformulate the problem:** Let $x_i = d_i - 1$. Since $d_i$ can be 1, 2, or 3, $x_i$ can be 0, 1, or 2.
4. Then the sum condition becomes:
$$\sum_{i=1}^7 d_i = 10 \implies \sum_{i=1}^7 (x_i + 1) = 10 \implies \sum_{i=1}^7 x_i + 7 = 10 \implies \sum_{i=1}^7 x_i = 3.$$
5. **New problem:** Count the number of solutions to
$$x_1 + x_2 + \cdots + x_7 = 3$$
where each $x_i \in \{0,1,2\}$.
6. **Method:** Use generating functions or combinatorial counting.
7. The generating function for each digit is:
$$f(t) = 1 + t + t^2$$
8. The generating function for all 7 digits is:
$$F(t) = (1 + t + t^2)^7$$
9. We want the coefficient of $t^3$ in $F(t)$.
10. Expand using the trinomial theorem:
$$ (1 + t + t^2)^7 = \sum_{a+b+c=7} \binom{7}{a,b,c} 1^a t^b (t^2)^c = \sum_{a+b+c=7} \binom{7}{a,b,c} t^{b+2c} $$
where $a,b,c \geq 0$ and $a+b+c=7$.
11. We want all triples $(a,b,c)$ with $a+b+c=7$ and $b+2c=3$.
12. Solve $b + 2c = 3$ for nonnegative integers $b,c$:
- If $c=0$, then $b=3$.
- If $c=1$, then $b=1$.
- If $c=2$, then $b=-1$ (not valid).
So valid pairs are $(b,c) = (3,0)$ and $(1,1)$.
13. For each pair, find $a = 7 - b - c$:
- For $(3,0)$: $a = 7 - 3 - 0 = 4$
- For $(1,1)$: $a = 7 - 1 - 1 = 5$
14. Calculate multinomial coefficients:
- For $(a,b,c) = (4,3,0)$:
$$\binom{7}{4,3,0} = \frac{7!}{4!3!0!} = \frac{5040}{24 \times 6} = 35$$
- For $(a,b,c) = (5,1,1)$:
$$\binom{7}{5,1,1} = \frac{7!}{5!1!1!} = \frac{5040}{120 \times 1 \times 1} = 42$$
15. Total number of sequences is:
$$35 + 42 = 77.$$
Digit Sum 7 476709
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.