Find the smallest positive integer which ends in 17, is divisible by 17, and whose digits sum to 17.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
17x9=153 17x99 = 1683
Don’t get the point why the number appended must be divisible by 9
Log in to reply
If the sum of digits of a number is divisible by 9 (in this case 9 itself) then the number itself is divisible by 9 (can be proved by taking mod 9 on the number)
Copy pasted from here: https://math.stackexchange.com/questions/1367371/find-the-smallest-positive-integer-that-ends-in-17-is-divisible-by-17-and
BUT 15317 IS NOT A POSITIVE INTEGER!
Log in to reply
Every integer that is greater than 0 is a positive integer.
Suppose n is the number then:
n ≡ 17(mod 100) since n ends in 17. n ≡ 17 (mod 9) since the digits of n sum to 17 n ≡ 17 (mod 17) since n is divisible by 17.
From Chinese Remainder Theorem,
n ≡ 17 mod 100⋅9⋅17 = 15300
and smallest positive solution n = 17+15300 = 15317
this is good
so good a solution i ever see.
If the number n ends in 17 and is divisible by 17, that means it's of the form 1 0 0 m + 1 7 for some m a multiple of 17; the digit sum of m must be 1 7 − 1 − 7 = 9 , implying that 9 divides m. Since 17 and 9 are coprime, the smallest possible value is m = 1 7 ∗ 9 = 1 5 3 and n = 1 5 3 1 7 .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
Enter number [10-99]: 17 Valid entry.
The smallest positive integer which ends in 17, is divisible by 17, and whose digits sum to 17 is 15317
So the number where looking for ends in 17 which has an digit sum of 8 so we want the digits on the front to have a digit sum of 9 and be divisible by 17. We can see that the smaller possible integer is 17×9=153 (1+5+3=9) So the number is 15317
All those mathy approaches are... too mathy! Let's make things funnier by using a golfing language to solve this problem! I used Pyth , for instance:
f&q17sjT&!%T17q"17">`T_2
Which swiftly gave me the correct result, 15317.
f&q17sjT&!%T17q"17">`T_2 ~ Full program, outputs to STDOUT.
f ~ First input where the condition is truthy over [1, 2, 3, 4, ...].
q17sjT; ~ Is (q) the sum (s) of the digits (jT;) 17?
& ~ And
!%T17 ~ Is the remainder when divided by 0 falsy (In other words, is T divisible by 17?)
& ~ And
q"17">`T_2 ~ Are (q) the last two digits (>`T_2) equal to 17 ("17")?
If one is going to resort to mechanical assistance for a question this easy (I did not and would not) I much prefer this approach to the earlier example of a computer program to solve the problem.
I like This approch too. A Monkey like me try each FACTOR 101,201,301, and become Boring UNTIL 901! And _try to _do a _reg _approch _like _you. _Many _thanks _and _really sorry for underscore instead space because the explorer of microfoft auto correct all word in french! i become_crazy!!!
let, the number is = x17 ; where x is unknown & sum of some digits & x+1+7= 17; hence, x = 9; & x is must be divisible by 17; now, we find 153/17= 9; so, x = 153; because, 1+5+3=9; hence, the number is x17= 15317; :)
End with 17 means 17 x #01, and the # is 17-1-7=9. Therefore 17x901 = 15317
The lazyiest solution is to use excel It always works fine unless you establish a successful model
Problem Loading...
Note Loading...
Set Loading...
The positive integer is 1 5 3 1 7
The number ends in 1 7 , so we have a starting point, the digit sum is 8 . We now need a digit sum of 9, and the number appended on the left has to be divisible by 9 . Since 1 7 and 9 are coprime, 1 7 × 9 = 1 5 3 is the smallest such number.
Hence the answer is 1 5 3 1 7
Source