[Math] Sum of digits and product of digits is equal (3 digit number)

discrete mathematicseducation

My child got a question in school (grade) that is:

Find biggest and smallest 3 digits number, which has sum of it's digits equal to product of those digits.

Help please since I cannot explain my child this question.

Example would be:

$1+2+3=1\cdot 2\cdot 3$

$3+2+1=3\cdot 2\cdot 1$

Numbers 123 and 321

But this is just example of this, how to solve it as a problem.

Best Answer

Clearly $0$ cannot be one of the digits: if it were, the product would be $0$, and the sum would not. We can’t have two $1$’s: if the remaining digit is $c$, the product is $c$, but the sum is $c+2$. This means that the smallest two digits must be at least $1$ and $2$.

It’s easy to check that the digits cannot all be the same: the only solutions of the equation $a^3=3a$ are $a=0$ and $=\pm\sqrt3$, none of which is possible in this problem. Thus, if the digits are $a,b$, and $c$, with $a\le b\le c$, we must have $a<c$.

We already know that $b\ge 2$; suppose that $b\ge 3$; then $abc\ge bc\ge 3c>a+b+c$, since we know that $a<c$. Thus, there is no solution with $b\ge 3$. There is also no solution with $a=b=2$: that would require $4c=4+c$, $3c=4$ and $c=4/3$, which is impossible. Thus, every solution must have $a=1$ and $b=2$. This means that $2c=3+c$, whose only solution is $c=3$.

Thus, the three digits must be $1,2$, and $3$. The smallest number that can be formed from them is $123$, and the largest is $321$.

Related Question