STEP II 2020 Digit sum

Find the sum of all integers that are equal to 44 44 times their digit sum.


The answer is 792.

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.

3 solutions

Chris Lewis
Jun 19, 2020

First, the digit sum of a k k -digit number is at most 9 k 9k , whereas a k k -digit number is (by definition) at least 1 0 k 1 10^{k-1} . We therefore need 44 9 k = 396 k 1 0 k 1 44\cdot 9k = 396k \ge 10^{k-1}

It's easy to check that this means we are interested in numbers with at most 4 4 digits.

So, let's put n = 1000 a + 100 b + 10 c + d n=1000a+100b+10c+d (where a , b , c , d a,b,c,d are all in the range 0 0 to 9 9 inclusive). The digit sum of n n is a + b + c + d a+b+c+d ; so 44 a + 44 b + 44 c + 44 d = 1000 a + 100 b + 10 c + d 956 a + 56 b = 34 c + 43 d \begin{aligned} 44a+44b+44c+44d &=1000a+100b+10c+d \\ 956a+56b &=34c+43d \end{aligned}

The right-hand side is at most 34 9 + 43 9 = 693 34\cdot 9+43\cdot 9=693 which forces a = 0 a=0 and 56 b = 34 c + 43 d 56b=34c+43d

Taking the equation modulo 9 9 , we find b + c + d 0 b+c+d \equiv 0 ; so n n is a multiple of 9 9 . Also, n n is a multiple of 44 44 ; hence n n is a multiple of 396 396 and is less than 1000 1000 . There are only two options; n = 396 n=396 doesn't work, but n = 792 n=792 does; so n = 792 n=\boxed{792} is the unique solution.

shouldn't you have specified positive integers?

Fletcher Mattox - 11 months, 3 weeks ago
Mark Hennings
Jun 19, 2020

If n n is a positive integer such that n = 44 D S ( n ) n = 44DS(n) , where D S ( n ) DS(n) is the sum of the digits of n n , then certainly n n is a multiple of 44 44 . If n n has X X digits then 1 0 X 1 n = 44 D S ( n ) 44 × 9 X = 396 X 10^{X-1} \; \le \; n \; = \; 44DS(n) \; \le \; 44 \times 9X \; = \; 396X so that 1 0 X 3960 X 10^X \; \le \; 3960X which implies that X 4 X \le 4 . There are no 1 1 -digit numbers with this property. Since 44 44 and 88 88 are the only 2 2 -digit multiples of 44 44 , there are no 2 2 -digit numbers with this property.

Now consider a 3 3 -digit number n = a b c n = \overline{abc} . Then 100 a + 10 b + c = 44 ( a + b + c ) 100a + 10b + c = 44(a + b + c) , so that 56 a = 34 b + 43 c 56a = 34b + 43c . This means that c = 2 γ c = 2\gamma is even, and that 28 a = 17 b + 43 γ 28a = 17b + 43\gamma . Since n n is a multiple of 11 11 , a b + c 0 ( m o d 11 ) a - b + c \equiv 0 \pmod{11} , and so b = a + c 11 e b = a + c - 11e where e = 0 e = 0 or 1 1 . Thus 28 a = 17 a + 17 c 187 e + 43 γ = 17 a + 77 γ 187 e 28a = 17a + 17c - 187e + 43\gamma = 17a + 77\gamma - 187e , so that a = 7 γ 17 e a = 7\gamma - 17e . Since 7 γ = a + 17 e a + 17 26 7\gamma = a + 17e \; \le \;a + 17 \le 26 we deduce that γ 3 \gamma \le 3 . There are four possibilities:

  • γ = 0 \gamma=0 gives e = 0 e=0 and a = 0 a=0 , which is impossible,
  • γ = 1 \gamma = 1 gives e = 0 e=0 and a = 7 a=7 , b = 9 b=9 and c = 2 c=2 ,
  • γ = 2 \gamma=2 gives a = 14 17 e a=14 - 17e , which is impossible,
  • γ = 3 \gamma=3 gives e = 1 e=1 and a = 4 a=4 , b = 1 b=-1 and c = 6 c=6 , which is impossible

The only 3 3 -digit number with the desired property is 792 = 44 ( 7 + 9 + 2 ) 792 = 44(7 + 9 + 2) .

Now consider a 4 4 -digit number n = a b c d n = \overline{abcd} . Then n = 1000 a + 100 b + 10 c + d = 44 ( a + b + c + d ) n = 1000a + 100b + 10c + d = 44(a + b + c +d) , so that 956 a + 56 b = 34 c + 43 d 956a + 56b \; = \; 34c + 43d In addition a b + c d 0 ( m o d 11 ) a-b+c-d \equiv 0 \pmod{11} , so that b + d = a + c + 11 e b + d = a + c + 11e where e = 1 e = -1 , 0 0 or 1 1 . But then n = 44 ( a + b + c + d ) = 88 ( a + c ) + 484 e 88 × 18 + 484 = 2068 n = 44(a + b + c + d) =88(a + c) + 484e \; \le \; 88 \times 18 + 484 = 2068 , and hence a 2 a \le 2 . But then n 88 × 11 + 484 = 1452 n \le 88 \times 11 + 484 = 1452 , so it follows that a = 1 a = 1 . But this means that 956 956 a + 56 b = 34 c + 43 d ( 34 + 43 ) 9 = 693 956 \; \le \; 956a + 56b \; = \; 34c+ 43d \; \le \; (34 + 43)9 = 693 which is impossible. Thus there are no 4 4 -digit numbers with the required property.

Thus the only positive integer with the desired property, and hence the sum of all integers with that property, is 792 \boxed{792} .

Razing Thunder
Jun 23, 2020
 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
def sum (x):
    if x<10:
        a=x
        m=(a)

    elif x<100:
        a=x%10
        b=x//10
        m=(a+b)

    elif x<1000:
        a=x%10
        b=(x%100)//10
        c=x//100
        m=(a+b+c)

    elif x<10000:
        a=x%10
        b=(x%100)//10
        c=(x//100)%10
        d=x//1000
        m=(a+b+c+d)

    elif x<100000:
        a=x%10
        b=(x%100)//10
        c=(x//100)%10
        e=x//10000
        d=(x//1000)%10
        m=(a+b+c+d+e)

    elif x<1000000:
        a=x%10
        b=(x%100)//10
        c=(x//100)%10
        d=(x//1000)%10
        e=(x//10000)%10
        f=x//100000
        m=(a+b+c+d+e+f)
    return m                     


for i in range(100000):
    b=i
    m=44*sum(i)  # u have to multiply sum by 44 
    if b==m :
        print("yes",i)
 #now u can add 0 and 792

you could have used a loop in the definition of the function

Sahil Goyat - 11 months, 3 weeks ago

How @Sahil Goyat

Razing Thunder - 11 months, 3 weeks ago

Log in to reply

1
2
3
4
5
def sum(n):
    s=0
    for i in str(n):
        s+=int(i)
    return s

Sahil Goyat - 11 months, 3 weeks ago

Log in to reply

I am beginner I did not reach that level yet but will soon

Razing Thunder - 11 months, 3 weeks ago

@Sahil Goyat when will pokemon unite launched

Razing Thunder - 11 months, 3 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...