Find this integer with these characteristics

Find the smallest positive integer which ends in 17, is divisible by 17, and whose digits sum to 17.


The answer is 15317.

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.

10 solutions

Munem Shahriar
Nov 19, 2017

The positive integer is 15317 15317

The number ends in 17 , 17, so we have a starting point, the digit sum is 8. 8. We now need a digit sum of 9, and the number appended on the left has to be divisible by 9 9 . Since 17 17 and 9 9 are coprime, 17 × 9 = 153 17 \times 9 = 153 is the smallest such number.

Hence the answer is 15317 \boxed{15317}

Source

17x9=153 17x99 = 1683

Richard Desper - 3 years, 6 months ago

Log in to reply

A typo. Thanks

Munem Shahriar - 3 years, 6 months ago

Don’t get the point why the number appended must be divisible by 9

Chris Wan - 3 years, 6 months ago

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)

Tristan Chaang - 3 years, 6 months ago

Copy pasted from here: https://math.stackexchange.com/questions/1367371/find-the-smallest-positive-integer-that-ends-in-17-is-divisible-by-17-and

Rohan K - 3 years, 5 months ago

Log in to reply

Yes, this problem is not original..

Munem Shahriar - 3 years, 5 months ago

BUT 15317 IS NOT A POSITIVE INTEGER!

Rollins Baird - 3 years, 5 months ago

Log in to reply

Every integer that is greater than 0 is a positive integer.

Munem Shahriar - 3 years, 4 months ago
Vijay Simha
Nov 8, 2017

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

Veides Kasera - 3 years, 6 months ago

so good a solution i ever see.

wensin qin - 3 years, 5 months ago
Stephen Brown
Nov 9, 2017

If the number n n ends in 17 and is divisible by 17, that means it's of the form 100 m + 17 100m+17 for some m a multiple of 17; the digit sum of m must be 17 1 7 = 9 17-1-7 = 9 , implying that 9 divides m. Since 17 and 9 are coprime, the smallest possible value is m = 17 9 = 153 m = 17*9 = 153 and n = 15317 n = \boxed{15317} .

 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
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 21 19:05:54 2017

@author: Michael Fitzgerald
"""

def enter_int():
    try:
        number = input("Enter number [10-99]: ")
        if (type(number) is int) and (len(str(number)) == 2): # checks whether entry is a number
            print "Valid entry."
            return number
    except:
       print 'Incorrect entry'

number = enter_int()

for i in range(number,1000000,100):
    #print i
    sum_ = 0
    nstr = str(i)
    for digit in nstr:
        sum_ += int(digit)
        #print sum_
    if (i%number == 0) and (sum_ == number):
        print '''
        The smallest positive integer which ends in %d, is divisible by %d, and whose digits sum to %d is %d
         ''' % (number, number, number, i)
        break

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

Victor Dumbrava
Nov 21, 2017

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.

How it works

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.

Thomas Sutcliffe - 3 years, 6 months ago

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!!!

CREACH ALAIN - 3 years, 6 months ago
Luca Heinen
Nov 30, 2017

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; :)

Terrence Yang
Nov 24, 2017

End with 17 means 17 x #01, and the # is 17-1-7=9. Therefore 17x901 = 15317

Sefer Özhan
Nov 24, 2017

The lazyiest solution is to use excel It always works fine unless you establish a successful model

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...