## Problem 3.

How many numbers, between 1,000 and 9,999, satisfy that the sum of their four digits is greater than or equal to the product of the same?

For how many of them does the equality hold?

If the number had a zero among its digits, then we would have the strict inequality. There are exactly 9000 - $9^{4}=2439$ numbers of this type, that is, with a digit equal to zero.

Consider the number "abcd" written in its decimal expression, and assume that it does not contain any zero digit. Then the inequality

$$
a+b+c+d \geq a \times b \times c \times d
$$

is equivalent (dividing by $\mathrm{a} \times \mathrm{b} \times \mathrm{c} \times \mathrm{d}$) to

$$
\frac{1}{\mathrm{~b} \times \mathrm{c} \times \mathrm{d}}+\frac{1}{\mathrm{a} \times \mathrm{c} \times \mathrm{d}}+\frac{1}{\mathrm{a} \times \mathrm{b} \times \mathrm{d}}+\frac{1}{\mathrm{a} \times \mathrm{b} \times \mathrm{c}} \geq 1
$$

Therefore, if three or four of these digits were ones, then one of the four previous summands would be 1, and we would obtain the strict inequality. There are exactly $4 \times 8+1=33$ numbers of this type.

On the other hand, let us prove that a necessary condition for the inequality to hold is that the number must have at least two ones among its digits.

Indeed, suppose by contradiction, and without loss of generality, that $b, c, d \geq 2$. Then

$$
\mathrm{b} \times \mathrm{c} \times \mathrm{d} \geq 8 ; \quad \text { a } \times \mathrm{c} \times \mathrm{d} \geq 4 ; \quad \text { a } \times \mathrm{b} \times \mathrm{d} \geq 4 ; \quad \text { a } \times \mathrm{b} \times \mathrm{c} \geq 4
$$

and thus, by (1), we have:

$$
1 \leq \frac{1}{8}+\frac{1}{4}+\frac{1}{4}+\frac{1}{4}=\frac{7}{8}
$$

which is a contradiction.

It remains, therefore, to consider the case where the number has exactly two digits equal to one. Suppose, for example, that $a=b=1$ and $c, d>1$. In this case, the inequality in question translates to

$$
\frac{2}{\mathrm{c} \times \mathrm{d}}+\frac{1}{\mathrm{c}}+\frac{1}{\mathrm{~d}} \geq 1
$$

Let us first prove that at least one of the digits c or d must be a two. Indeed, if, on the contrary, $\mathrm{c}, \mathrm{d} \geq 3$, then

$$
\mathrm{c} \times \mathrm{d} \geq 9 ; \quad \mathrm{c} \geq 3 ; \quad \mathrm{d} \geq 3
$$

and thus, by (2), we have: $1 \leq \frac{2}{9}+\frac{1}{3}+\frac{1}{3}=\frac{8}{9}$, which is a contradiction.

Suppose, therefore, that $\mathrm{c}=2$. We then obtain that

$$
\frac{2}{d}+\frac{1}{2} \geq 1
$$

which is equivalent to saying that $\mathrm{d} \leq 4$.

Summarizing:

If $\mathrm{d}=4$, then we obtain the initial equality (the digits are 1,1,2,4; and there are 12 numbers of this type).

If $\mathrm{d}=3$, then we obtain the strict initial inequality (the digits are 1,1,2,3; and there are 12 numbers of this type).

If $d=2$, then we obtain the strict initial inequality (the digits are 1,1,2,2; and there are 6 numbers of this type).

Therefore, and in summary, the inequality holds for

$$
2439+33+12+12+6=2502 \text { numbers }
$$

and the equality in 12 of them.
No matching solution found.