How many positive integers $n$ satisfy $n = P(n) + S(n)$

$\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$ 5

2 Answers

$\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$ 4 $\begingroup$

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

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like