2017-digit multiple of 7!?

Let A A be the sum of the decimal digits of the largest 2017-digit multiple of 7 and B B be the sum of the decimal digits of the smallest 2017-digit multiple of 7. Find A B A-B .


The answer is 18144.

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

The largest is

a = 7. 1 0 2017 7 a=7.\lfloor \frac{10^{2017}}{7} \rfloor

note that

1 0 2017 = 7 × t + 3 t = 1 0 2017 3 7 a = 7 × t = 1 0 2017 3 10^{2017}=7\times t+3 \implies t=\frac{10^{2017}-3}{7} \implies a=7 \times t=10^{2017}-3

a a has 2016 9 9 's and 1 7 7 , so the sum of its digits is A = 9.2016 + 7 A=9.2016+7

Similarly, the smallest is

b = 7. ( 1 0 2016 7 + 1 ) b=7.(\lfloor \frac{10^{2016}}{7}+1) \rfloor

and

1 0 2016 = 7 × k + 1 k = 1 0 2016 1 7 b = 7 × ( k + 1 ) = 1 0 2016 1 + 7 = 1 0 2016 + 6 10^{2016}=7\times k+1 \implies k=\frac{10^{2016}-1}{7} \implies b=7 \times (k+1)=10^{2016}-1+7=10^{2016}+6

b b has 2015 0 0 's, 1 1 1 and 1 6 6 , so the sum of its digits is B = 1 + 6 B=1+6

Finally A B = 2016 × 9 A-B=2016 \times 9

2017=(6)(336)+1. Each 6n digit multiple of 7 (n is a positive integer) contains 6n 9's, and (6n+1) digit multiple contains 6n 9's and a 7 in the end. Therefore A=(2016)(9)+7=18151. The minimum 2017 digit multiple is 7 more than the maximum 2016 digit multiple of 7 by 7. Therefore this minimum has 1 as the leftmost digit followed by 2015 zeros and 6 as the unit place digit. Therefore B=1+6=7 and hence A-B=18151-7=18144

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...