A crazy number theoretic problem

84 Views Asked by At

How many positive integers satisfy the condition that the product of their digits multiplied by the sum of their digits equals themselves? For example,

13 is not equal to (1+3)(1×3)

Here is how i proceeded I defined a number n such that $10^{k+1}$$>$$n$$>$$10^k$ Next, i will expand the number in powers of tens. Now i am trying to create a bound, but at this stage, i am unsuccessful in each of my attempts. Please help me!

1

There are 1 best solutions below

7
On

To set an upper bound, note that each digit is at most $9$. If the number has $n$ digits, the computation gives at most $(9n)(9^n)=n9^{n+1}$. An $n$ digit number is at least $10^{n-1}$. Alpha tells us that for $n=85$ we have the number is greater than the sum of digits times the product of digits, so you only have to search up to $10^{84}$. Happy hunting.

Now note that most of the factors of the number need to be $2,3,5,7$ because the only way you can get a larger one is from the sum of the digits. As lulu points out you can't have both $2$ and $5$ as factors because it would end in zero and the product would be zero. The number needs to be $2^a3^b7^cd$ or $3^a5^b7^cd$ with $d \lt 9\cdot 84$. If you have a programming language that supports large ints, like Python, and a nice way to turn a number into a string you can just do the search. A little cleverness can speed it up, like noting that $e$ can't be that large unless the other numbers are large.