1
$\begingroup$

Let $P(n)$ denote the product of digits of $n$ and let $S(n)$ denote the sum of digits of $n$. Then how many positive integers $n$ satisfy

$$ n = P(n) + S(n) $$

I think I solved it, but I need your input.

I first assumed that $n$ is a two digit number. Then $n=10a+b$ and according to the requirement

$$ 10a + b = ab + a + b\\ \Rightarrow 9a = ab \\ \Rightarrow b = 9 $$ (Since a is not zero) Now we have { 19,29,39,49,59,69,79,89,99} a set of 9 numbers that satisfy the requirement. However if we assume a three digit number $n=100a+10b+c$ then

$$ 100a+10b+c = abc+a+b+c\\ \Rightarrow 99a+9b=abc\\ \Rightarrow 9(11a+b) = abc\\ $$ Either two of the digits are $1$ and $9$ or $3$ and $3$ and for any such cases the left hand side is much larger than the right side. If there cannot be three digit number, there cannot be higher cases.

Is this good reason?

$\endgroup$
  • 3
    $\begingroup$ "If there cannot be three digit number, there cannot be higher cases." Why? (I'm not saying you're right or you're wrong, but this isn't an argument in itself.) $\endgroup$ – Billy Jul 15 '13 at 20:08
  • $\begingroup$ because $9(111a+11b+c)=abcd$ has much larger number on the left $\endgroup$ – Niya Iyer Jul 15 '13 at 20:11
  • $\begingroup$ Your intuitive reasoning is correct, but you might want to make it a bit more rigorous before it is seen as fully correct proof. $\endgroup$ – Peter Košinár Jul 15 '13 at 20:19
  • 1
    $\begingroup$ Possible duplicate. $\endgroup$ – Kunnysan Jul 15 '13 at 20:21
  • $\begingroup$ I wrote a program to test this up to $10,000,000$ and found only $9$ numbers. $\endgroup$ – wjm Jul 15 '13 at 20:50
1
$\begingroup$

In general, if you have $n-$ digit number $A=\overline{a_1a_2...a_n},$ then $P(A)+S(A)\le 9^n+9n$ whereas $A\ge 10^{n-1}.$ So we must have $10^{n-1}\le 9^n+9n,$ which becomes impossibel fairly quickly due to the growth of the left hand side.

$\endgroup$
  • 1
    $\begingroup$ Ermm... did you mean $A\geq 10^{n-1}$? $\endgroup$ – Peter Košinár Jul 15 '13 at 20:15
  • $\begingroup$ sure, I have made an edit, thanks. $\endgroup$ – leshik Jul 15 '13 at 20:29
  • 3
    $\begingroup$ Specifically, from $n=22$ onwards this is impossible. However that still leaves a lot of numbers to check. $\endgroup$ – vadim123 Jul 15 '13 at 20:32
  • 2
    $\begingroup$ One can reduce the bound all the way down to $n=4$ by considering the first digit of the number separately and thus getting tighter bounds on $A$, $P(A)$ and $S(A)$ (one sufficient condition for impossibility is $10^{n-1}-9^{n-1}-1 > 9(n-1)$; with $n=3$ only narrowly escaping being ruled out too). $\endgroup$ – Peter Košinár Jul 15 '13 at 20:40
1
$\begingroup$

hint : consider the inequality $10^x\leq 9^x+9x$

$\endgroup$

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.