Given the number 188188...188 (number 188 is written 101 times). Some digits of this number are crossed out. What is the largest multiple of 7, that could happen?
Changing any of the digits from an 8 to a 1 or vice versa doesn't change the number's divisibility by 7, since you're just increasing or decreasing the value by 7 * (10 to some power).
So we can change the original number to simply be 303 consecutive 1s and it is the same value mod 7 as the original number.
Now it's easy to see that removing any arbitrary digit has the same effect of simply reducing the value by 10^302 mod 7. Removing a second digit from anywhere would reduce the number by a further 10^301 mod 7, etc.
It's also easy to see that powers of 10 are cyclically (1,3,2,6,4,5) mod 7, and therefore the numbers 1, 11, 111, 1111, etc are cyclically (1,4,6,5,2,0) mod 7. So a string of 303 consecutive 1s would by 6 mod 7, and we'd need to remove any three of them to make it 0 mod 7.
Having done so we can arbitrarily change as many of the 1s back into 8s to satisfy the original conditions of the problem, which is maximized by changing them all into 8s until we need a 1 to appear. So we get the same result, 888888188188....
|
Posted by tomarken
on 2021-04-21 11:05:42 |