Let N be the smallest positive integer that is divisible by 1 2 8 and has digit sum equal to 1 2 8 . In decimal notation, N consists of a 8 's, b 9 's and possibly some other digits. What is a × b ?
Details and assumptions
In decimal notation, 1 2 8 2 8 9 consists of 2 8 's, 1 9 's and some other digits.
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.
Nicely done!
Much of my solution was the same as yours, but I did one part differently. Namely the question of whether there are 7-digit multiples of 128 with a sum of digits S ≥ 5 9 .
I decided not to try all the possibilities one at a time, so I proceeded as follows: Supposing there is such a number, it would be of the form 1 0 7 − ∑ j = 0 4 x j where:
∙ each x j is either zero or a power of ten
∙ x 0 = 1
∙ x j ∣ x j + 1 (for each j = 1 , 2 , 3 )
(The zeros, if any, will be at the end, and the number of them will be S − 5 9 .) We want X = ∑ j = 0 4 x j to be a multiple of 128.
For X to be even, x 1 = 1 , and if x 2 = 1 then x 3 = 1 as well. That would mean x 4 is divisible by 4 but not 8, i.e. x 4 = 1 0 0 . But then X = 1 0 4 is not a multiple of 128.
So we must have x 1 = 1 = x 2 . Then x 2 = 1 0 (for X to be divisible by 4) and if x 3 = 1 0 then x 4 = 1 0 as well. But then X = 3 2 is not a multiple of 128.
So x 3 = 1 0 0 (for X to be divisible by 8) and x 4 = X − 1 1 2 ≡ 1 6 m o d 1 2 8 . Exactly one value works, namely x 4 = 1 0 0 0 0 . That is to say, there is exactly one 7-digit multiple of 128 with a sum of digits S ≥ 5 9 , namely 1 0 7 − 1 0 1 1 2 = 9 9 8 9 8 8 8 .
sorry, should be a b = 4 0
Can you explain why the last 7 digits must be divisible by 128? Some kind of theorem involved?
Log in to reply
Well, since 1 0 7 = 2 7 ∗ 5 7 , the last seven digits are periodic with period of 5 7 . Therefore, the digits to the left of the seven last digits can be whatever we want them to be, and since they have no bearing on the last seven digits, then the last seven digits must be divisible by 128, if that makes more sense.
128 divides 10^7 so if you find the 7 digit number that divides 128 with the biggest digit sum, you can just keep adding 9 at the start (to get the digit sum to 128) until you get a reminder (which in this case is a 6) and by that get the smallest number that divides 128 and has a digit sum of 128.
Ha! same approach!
Hi. Would someone be able to tell me why N doesn't equal 399999999999998. I thought this was the answer because the digits add to 128 and it also divides by 128 and it is smaller than everyone else's answers? Thanks
Log in to reply
it doesnt. That was my first answer and I was getting real excited but than I realized it doesnt divide :/
For the divisor 128, the whole number either divisible or not is determined by the last seven digits such that there are 78 125 seven-digit numbers and among of these, the number should be an even number and last three digits should be divisible by 8. The number must be more than 10 000 000 because the maximum sum of the seven digits, 9 x 7 = 63. The last three digits numbers, 898, 988 and 998 are out because they does not satisfies the conditions. 10 000 000 - 128 = 9 999 872 less than 9 999 888 also not satisfies the following conditions. Let's try sum of seven digits = 59. 9 989 888 divide by 128 = 78 046 So the remaining sum, 128 - 59 = 69 69 = 7 x 9 + 6, such that the largest number is 999,999,969,989,888 We found that there are 10 9's and 4 8's Therefore, 10 x 4 = 40.
I believe you meant the smallest possible number, so the 6 must come at the left or most-significant digit. That is 699,999,999,989,888.
The count of 9's and 8's is the same, of course.
Note that 1 2 8 = 2 7 and 1 0 0 0 0 0 0 0 = 2 7 ∗ 5 7 Hence 1 2 8 ∣ 1 0 0 0 0 0 0 0 Counting down from 10000000, we find the number with the largest possible digit sum. We find that the number is 9989888 Let g be an integer g 9 9 8 9 8 8 8 must be a multiple of 128 as g 9 9 8 9 8 8 8 = g ∗ 1 0 0 0 0 0 0 0 + 9 9 8 9 8 8 8 = 1 2 8 ( g ∗ 5 7 + 7 8 0 6 )
Hence, the digits of g can be chosen at will.
Thus, for N to be the smallest, g = 6 9 9 9 9 9 9 9 Hence N = 6 9 9 9 9 9 9 9 9 9 8 9 8 8 8 a = 1 0 b = 4
a ∗ b = 1 0 ∗ 4 = 4 0
29999 99999 99999 is smallest number with digit sum 128. For divisibility by 128 i focused on last 7 digits. (100 00000 - 128) = 99 99872 and further down. Got interesting combinations like 99 98976, 99 89888, 97 97888, 89 97888, 88 99968, 79 89888.. So 99 89888 works best as sum only 4 less than 99 99999.... so 29999 99999 99999 becomes 69999 99999 89888 [my Answer]
Eager to get better solution, sorry for mistakes if any...Thanks to all :)
Hello sir! :)
Problem Loading...
Note Loading...
Set Loading...
Firstly, note that the number must have more than 7 digits. Secondly, any positive integer divisible by 2 7 = 1 2 8 has its last seven digits divisible by 1 2 8 . Now, to minimize N , we have to maximize the sum of digits of the last 7 digits of N . Let the maximum value of the sum of the last 7 digits of N be S . We first claim that S < 6 0 . Clearly, S ≤ 9 ⋅ 7 = 6 3 . Obviously S = 6 3 is impossible as 3 2 ∤ 9 9 9 9 9 9 9 , while S = 6 2 isn't possible either because 3 2 ∤ 9 9 9 9 9 9 8 . (The other 7-digit numbers are odd). For S = 6 1 , none of 9 9 9 9 9 8 8 , 9 9 9 9 8 9 8 , 9 9 9 8 9 9 8 , 9 9 8 9 9 9 8 , 9 8 9 9 9 9 8 , 8 9 9 9 9 9 8 are divisible by 1 2 8 . (the rest are odd.). Finally, for S = 6 0 , the numbers 9 9 9 9 9 9 6 , 9 9 9 9 8 8 8 , 9 9 9 8 9 8 8 , . . . (any permutation of 3 8 s and 4 9 s.) , 7 9 9 9 9 9 8 , 9 7 9 9 9 9 8 , 9 9 7 9 9 9 8 , 9 9 9 7 9 9 8 , 9 9 9 9 7 9 8 , 9 9 9 9 9 7 8 aren't divisble by 1 2 8 .
Now we show that S = 5 9 is possible. For this, consider 9 9 8 9 8 8 8 = 1 2 8 ⋅ 7 8 0 4 6 .
So, the first few digits of N must sum up to 1 2 8 − 5 9 = 6 9 . We want to minimize the number of digits, so we use as many 9 s as possible and put the remainder as the first digit. Thus, we arrive at N = 6 9 9 9 9 9 9 9 9 9 8 9 8 8 8 , with 1 0 9 s and 4 8 s. So, a = 1 0 , b = 4 and (ab = 40).