## Two-digit Sum And Product

#### Problem

If you multiply together the digits of the number 42, 4 2 = 8, but if you add the digits together, 4 + 2 = 6. For the number 31, the product of the digits, 3 1 = 3 and the sum of the digits, 3 + 1 = 4.

Can you find a two-digit number for which the product of its digits is the same as the sum of its digits?

#### Solution

Given the 2-digit number. (`ab`), we are solving: `a` + `b` = `ab`.

Therefore `ab` `b` = `a`, `b`(`a` 1) = `a`, giving `b` = `a`/(`a` 1).

Considering the possible values of the digit, `a`: `b` = 2/1, 3/2, 4/3, ..., 9/8 and the only integer solution is 2/1; that is, `a` = 2 and `b` = 2.

Hence there is only one two-digit solution, 22.

For which 2-digit numbers do the product of their digits exceed their sum?

Can you find any 3-digit number for which the sum of the digits is equal to the product of its digits?

What about `n`-digit numbers?