For a positive integer n, let P

_{n}denotes the product of digits of n, and S_{n}denotes the sum of the digits of n. The number of integers between 10 and 1000 for which P_{n}+ S_{n}= n is?
(1)81 (2)16
(3)18 (4)9

Solution follows here:

__Solution:__
The integers should be between 10 and 1000 => the integers
shall contain 2 digits are 3-digits. Let us check case by case.

**2-digit numbers:**

__Case-1:__
Let the integer be n = xy => n can be written as “10x+y”

Sum of digits = S

_{n}= x+y
Product of digits = P

_{n}= x*y
Given that, P

_{n}+S_{n}= n => (x*y)+(x+y) = 10x+y
=> x*y = 9x => x(y-9)=0 => x=0 or y=9

As x is the tens digit in the two digit number, it should not
be zero => y=9

For y=9, x may take values from 1 to 9 making the possible
value of integer to be 19,29,….99 => resulting in 9
values

__Case-II:__**3-digit numbers:**

Let the integer be n = xyz=> n can be written as “100x+10y+z”

Sum of digits = S

_{n}= x+y+z
Product of digits = P

_{n}= x*y*z
Given that, P

_{n}+S_{n}= n => (x*y*z)+(x+y+z) = 100x+10y+z
=> x*y*z = 99x+9y => z = (99x+9y)/xy = 99/y + 9/x

Observe carefully. The range of values y can take is 1 to 9,
for which 99/y results in the range from 99 to 11 respectively. This is quite
impossible as z should be equal to a single digit number only. Hence no possible values arise in this case.

Hence, in total there are 9 possible integers are available.

Answer (4)
18 would be the answer

ReplyDeleteThose many cases wont arise. Check out the solution provided now.

ReplyDelete