2. how many seven-digit numbers are there for which the product of the digits is equal to $45^{3}$?

## Solution:
We first examine which digits can occur how often. The prime factorization of $45^{3}$ is $3^{6} \cdot 5^{3}$. This shows that $1,3,5$ and 9 are the only natural numbers that are smaller than 10 and divide $45^{3}$. Therefore, only these four digits can occur in the number. Since 5 is the only such digit that is divisible by 5, it must occur exactly three times in the seven-digit number. The product of the other four digits must be $3^{6}$. If the digit 1 occurs, the other three digits must all be 9s in order to get $3^{6}$. If there is no digit 1, two digits must be 3 and two digits must be 9. Every seven-digit number that fulfills the given condition therefore consists of either the digits 1,5,5, 5, 9, 9,9 or $3,3,5,5,5,9,9$.

We now calculate how many different numbers can be formed from these digits. In the first case, you have $\binom{7}{3}$ possibilities to distribute the 5s and 4 more possibilities to determine the 1. The arrangement of the three 9s is thus also fixed. So for the first case you get

$$
\binom{7}{3} \cdot 4=140
$$

Possibilities. In the second case, there are first again $\binom{7}{3}$ possibilities for distributing the 5s and then ( $\left.\begin{array}{l}4 \\ 2\end{array}\right)$ possibilities for the 3s. This gives you

$$
\binom{7}{3} \cdot\binom{4}{2}=210
$$

possibilities. So there are a total of $140+210=350$ such numbers.