I shall extend it get all number less than 1000. Let us check upto 3 digit number because for 4 digit number another approach shall be taken( I shall mention the approach at the end)
Now the largest 3 digit number is 999 and sum of digits is 27. so the sum of digits is 17 as it is divisible by 17. Of course it cannot be 0.
Let the number be n
n is divisible by 17
So
$n \equiv 0 \pmod {17}\cdots(1)$
Again sum of digits is 17 so
$n \equiv 8 \pmod 9 \cdots(2)$
We need to solve (1) and (2) to get the solution set from which we shall find the solution.The result shall be mod 153. (17 * 9 = 153)
Because one of the mod is zero we can provide a simpler solution
We have $n = 17k$ (from (1))
Putting in (2) we get
$17k \equiv 8 \pmod 9$
Or $8k \equiv 8 \pmod 9$
Or $k \equiv 1 \pmod 9$
So n = 17 is a solution
So we have general solution is 153m + 17
By putting m = 0 to 6 we get solution 17,170,323,476,629,782,935
Out of which some have digit sum 8 and other have digit sum 17 they are 476,629,782,935 with the lowest number 476
If we need 4 digit number sum of 4 digits can be 34 also . So we have another set of solution to look This is of the form 153k + 34.
This shall include another set besides 153k+ 17 that is 153k+ 34 all are not solution .this is the set from which we need to find solution.
No comments:
Post a Comment