Think Different!

Logic Level 3

The positive integers N N and N + 1 N+1 both have digit sums that are divisible by 7. What is the smallest possible value of N N ?


The answer is 69999.

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.

2 solutions

Joel Tan
Aug 23, 2014

Suppose N N ended with exactly x x '9's. (Clearly it must end with a 9, otherwise the digit sum will only increase by 1)

The '9's will become '0's, so the digit sum will decrease by 9 x 1 9x-1 (due to the x digits being reduced by 9, and the (x+1)th digit from the right increasing by 1)

This value must be a multiple of 7. After some testing (the quickest method since the answer is less than 7) the smallest possible x x is 4. We know that 69999 (digit sum is 42) is possible as 70000 has digit sum 7. If there was any number smaller than that, the digit sum must be between 36 and 42, contradiction.

Hence 69999 is the smallest.

1
2
3
4
5
6   7   6   6   0
69  70  15  1   0
699 700 24  3   0
6999    7000    33  5   0
69999   70000   42  0   0

Basically, continuous 9's at right hand side is its basis. While 6+9+9+9+9 is divisible by 7 with 7+0+0+0+0 divisible by 7, 69999 is the answer.

Answer: 69999 \boxed{69999}

Lu Chee Ket - 5 years, 4 months ago
Suresh Bala
Sep 6, 2014

If digit sum of N N is x x , then the digits sum of N + 1 N+1 is x + 1 x+1

Since both x x and x + 1 x+1 (in the same format) cannot be divisible by 7, we can conclude that the number x + 1 x+1 is further added to get a number divisible by 7.

We get this when x = 42 x=42 , since x + 1 = 43 x+1 = 43 which when further added gives digit sum as 7 which is divisible by 7.

So we need the smallest number whose sum of the digits is 42. The number will be smallest provided each digit is as maximum as possible. Since 42 = ( 4 × 9 ) + 6 42 = (4\times9) +6 , the number is 69999

i am not able to understand sir why you have not taken 16 or 25 as x?

U Z - 6 years, 9 months ago

Log in to reply

If you take 16, then x+1 will be 17 whose sum of the digits is 8, which is not divisible by 7. Same issue with 25 & 34 as well.

Suresh Bala - 6 years ago

Actually megh, if we take any random digit for this question, then the condition won't get satosfoed, suppose u took 16, now 1+6=7, and the consecutive number(n+1) digit will be 17,1+7=8, which is not divisible by 7, the two number's digit sum must be divisible by 7 and this is possible only if the numbers lie at the edge. By edge I meant (9,10) or (19,20) because here only the digit sum scenario changes. As take (19,20)--- 1+9=10 and 2+0=2, according to ur digits taken (16,17) the sum of the each consecutive digits should get increased but here something else is going on. So we start analysing from here and finally take the out answer

Abhay Tiwari - 5 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...