How to find the number(or numbers ) that has $4$ digits, the product of these digits equal to the sum of these digits ?

  • $\begingroup$ Not sure what does this have to do with the number itself? You are just looking for 4 digits that summed or multiplied give the same result? $\endgroup$ – gt6989b Nov 2 '12 at 13:21
  • $\begingroup$ @gt6989b yes but may be there is more than one such number . $\endgroup$ – htm Nov 2 '12 at 13:25
  • 2
    $\begingroup$ I'd think if there is one, you could get other ones by rotating them? I.e. if 1234 is ok, then 4321 must be ok as well, no? Or am I misunderstanding something? $\endgroup$ – gt6989b Nov 2 '12 at 13:26
  • $\begingroup$ @gt6989b yes you are right . $\endgroup$ – htm Nov 2 '12 at 13:32
  • $\begingroup$ I wonder why everybody is excluding zero as a digit up front, 0000 seems like an obvious first shot to me? $\endgroup$ – Frerich Raabe Nov 19 '12 at 9:22

First of all, let's observe that all of the digits of such a number cannot be the same. You can just manually check that numbers $1111$, $2222$ and so on don't suit us. It is also clear that all of the digits should be non-zero.

Now suppose that we have such a number. Let $a,\,b,\,c,\,d$ be its digits written in non-ascending order: $a \geqslant b \geqslant c \geqslant d$. Then we have $$ abcd = a + b + c + d. $$

From this we have an inequality: $$ a\cdot bcd < 4a. $$ This inequality is strict, because at least one of $b, c, d$ is strictly smaller than a. So we have: $$ bcd < 4, $$ which is the same as saying $$ bcd \leqslant 3. $$ This only leaves us with 3 possible combinations for $(b, c, d)$: $(1, 1, 1)$, $(2, 1, 1)$ and $(3, 1, 1)$.

If $b=c=d=1$, then $a\cdot 1 \cdot 1 \cdot 1 = a + 1 + 1 + 1$, which can't be true.

If $b=2$ and $c=d=1$, then $a \cdot 2 \cdot 1 \cdot 1 = a + 2 + 1 + 1$, which means that $a=4$. This gives us one possible solution: $a=4, b=2, c=d=1$.

If $b=3$ and $c=d=1$, then $a \cdot 3 \cdot 1 \cdot 1 = a + 3 + 1 + 1$, which is impossible.

So, the only solution is $a=4$, $b=2$, $c=d=1$. There are $12$ numbers with such digits.

| cite | improve this answer | |
  • $\begingroup$ Why do you exclude zero up front, 0000 would work as well, no? $\endgroup$ – Frerich Raabe Nov 19 '12 at 9:24
  • 1
    $\begingroup$ @FrerichRaabe I think that technically $0000$ is not a 4-digit number. It is my understanding that 4-digit numbers all lie between $1000$ and $9999$. $0050$, for instance, is a 2-digit number, because its standard form is $50$. From this point of view, $0000$ is a 1-digit number, because the standard notation for it is $0$. $\endgroup$ – Dan Shved Nov 19 '12 at 11:22

You can narrow your search rapidly:

  1. no digits $0$;
  2. at least one digit $1$ (otherwise the product exceeds the sum easily);
  3. at least two digits greater than $1$ (otherwise the sum now exceeds the product);
  4. exactly two digits greater than $1$ (the product of three such digits would exceed their sum by at least $2$).

So we're looking for pairs of digits in $\{2,3,\ldots,9\}$ whose product exceeds their sum by exactly $2$ (the number of digits $1$ we need to throw in). If one of them is $2$, the other must be $4$. If the smallest of the pair is at least $3$, then their product exceeds their sum by at least $3$, so this cannot happen.

So all in all there is essentially one solution, but since you asked for numbers , the $12$ permutations of the digits of $1124$ give you all solutions.

| cite | improve this answer | |

i observed a pattern in these numbers. 22 123 1124 11125 111126 1111127 and derived a formula for this.

if the last two digits are assumed to be a and b and for an n digit number there will be n-2 1's and a and b are to be found out using the below formula.


where a and b are from 2 to 9 which need to be evaluated manually for b=2 to 9

| cite | improve this answer | |
  • $\begingroup$ Does this give a number as the question asks? $\endgroup$ – vonbrand Jan 29 '13 at 17:32
  • $\begingroup$ Yes.. if the number of digits is 4 a=(b+2)/(b-1) and number of 1's in the number is 2.so the number would be 11ab.Now we have to solve for a and b using a=(b+2)/(b-1).which gives integer values for b=2 or b=4 and a=4 when b is 2 and a=2 when b=4.so the number would be 1124 and all permutations of it like 1124,1142,1214,1412 and so on. $\endgroup$ – Syam Kumar Feb 1 '13 at 7:56

Must be various combinations of $1,1,2,4$. I don't think there are any other combinations, I looked at all small numbers...

| cite | improve this answer | |
  • $\begingroup$ Can we find the number by using algebraic method ? $\endgroup$ – htm Nov 2 '12 at 13:41
  • $\begingroup$ Yes we can find those numbers using algebraic method $\endgroup$ – user90533 Mar 24 '16 at 3:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.