The String of 7

Consider a string of n n 7 7 's, 7777 77 , 7777\cdots77, into which + + signs are inserted to produce an arithmetic expression. For example, 7 + 77 + 777 + 7 + 7 = 875 7+77+777+7+7=875 could be obtained from eight 7 7 's in this way. For how many values of n n is it possible to insert + + signs so that the resulting expression has value 7000?


The answer is 108.

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

Otto Bretscher
Sep 19, 2015

As Johanz points out, we need to count the numbers n n such that the system a + 11 b + 111 c = 1000 , a + 2 b + 3 c = n a+11b+111c=1000, a+2b+3c=n has non-negative integer solutions a , b , c a,b,c . Subtracting the equations from each other, we see that 9 b + 108 c = 1000 n 9b+108c=1000-n , so that 1000 n 1000-n is divisible by 9. We can write n = 1000 9 k n=1000-9k for some 0 k 111 0\leq{k}\leq{111} .

Our equations can now be written as a = 21 c + 1000 11 k , b = k 12 c a=21c+1000-11k,b=k-12c . We need to choose k k and c c so that both a a and b b come out non-negative, meaning that 12 c k 21 c + 1000 11 12c\leq{k}\leq{\frac{21c+1000}{11}} . If we let c = 0 c=0 , we get solutions 0 k 90 0\leq{k}\leq{90} . If we let c = 7 c=7 , we get solutions 84 k 104 84\leq{k}\leq{104} .(Why don't we need to check 1 c 6 1\leq{c}\leq{6} ).If we let c = 8 c=8 , we get solutions 96 k 106 96\leq{k}\leq{106} . If we let c = 9 c=9 , we get the single solution k = 108 k=108 . Thus there are 108 \boxed{108} solutions overall, namely 0 k 106 0\leq{k}\leq{106} and k = 108 k=108 .

This work may become clearer if you look at the "feasible region" in the c k c-k plane, 12 c k 21 c + 1000 11 12c\leq{k}\leq{\frac{21c+1000}{11}} , a triangle.

Moderator note:

Good observations. The change of variables helps simplify the approach.

The answer is simply 28//// 777x9=6993 +7

Pankesh Gupta - 5 years, 8 months ago
Johanz Piedad
Sep 18, 2015

Suppose we require a a 7 7 s, b b 77 77 s, and c c 777 777 s to sum up to 7000 7000 ( a , b , c 0 a,b,c \ge 0 ). Then 7 a + 77 b + 777 c = 7000 7a + 77b + 777c = 7000 , or dividing by 7 7 , a + 11 b + 111 c = 1000 a + 11b + 111c = 1000 . Then the question is asking for the number of values of n = a + 2 b + 3 c n = a + 2b + 3c .

Manipulating our equation, we have a + 2 b + 3 c = n = 1000 9 ( b + 12 c ) 0 < 9 ( b + 12 c ) < 1000 a + 2b + 3c = n = 1000 - 9(b + 12c) \Longrightarrow 0 < 9(b+12c) < 1000 . Thus the number of potential values of n n is the number of multiples of 9 9 from 0 0 to 1000 1000 , or 112 112 .

However, we forgot to consider the condition that a 0 a \ge 0 . For a solution set ( b , c ) : n = 1000 9 ( b + 12 c ) (b,c): n=1000-9(b+12c) , it is possible that a = n 2 b 3 c < 0 a = n-2b-3c < 0 (for example, suppose we counted the solution set ( b , c ) = ( 1 , 9 ) n = 19 (b,c) = (1,9) \Longrightarrow n = 19 , but substituting into our original equation we find that a = 10 a = -10 , so it is invalid). In particular, this invalidates the values of n n for which their only expressions in terms of ( b , c ) (b,c) fall into the inequality 9 b + 108 c < 1000 < 11 b + 111 c 9b + 108c < 1000 < 11b + 111c .

For 1000 n = 9 k 9 ( 7 12 + 11 ) = 855 1000 - n = 9k \le 9(7 \cdot 12 + 11) = 855 , we can express k k in terms of ( b , c ) : n b ( m o d 12 ) , 0 b 11 (b,c): n \equiv b \pmod{12}, 0 \le b \le 11 and c = n b 12 7 c = \frac{n-b}{12} \le 7 (in other words, we take the greatest possible value of c c , and then "fill in" the remainder by incrementing b b ). Then 11 b + 111 c 855 + 2 b + 3 c 855 + 2 ( 11 ) + 3 ( 7 ) = 898 < 1000 11b + 111c \le 855 + 2b + 3c \le 855 + 2(11) + 3(7) = 898 < 1000 , so these values work.

Similarily, for 855 9 k 9 ( 8 12 + 10 ) = 954 855 \le 9k \le 9(8 \cdot 12 + 10) = 954 , we can let ( b , c ) = ( k 8 12 , 8 ) (b,c) = (k-8 \cdot 12,8) , and the inequality 11 b + 111 c 954 + 2 b + 3 c 954 + 2 ( 10 ) + 3 ( 8 ) = 998 < 1000 11b + 111c \le 954 + 2b + 3c \le 954 + 2(10) + 3(8) = 998 < 1000 . However, for 9 k 963 n 37 9k \ge 963 \Longrightarrow n \le 37 , we can no longer apply this approach.

So we now have to examine the numbers on an individual basis. For 9 k = 972 9k = 972 , ( b , c ) = ( 0 , 9 ) (b,c) = (0,9) works. For 9 k = 963 , 981 , 990 , 999 n = 37 , 19 , 10 , 1 9k = 963, 981, 990, 999 \Longrightarrow n = 37, 19, 10, 1 , we find (using that respectively, b = 11 , 9 , 10 , 11 + 12 p b = 11,9,10,11 + 12p for integers p p ) that their is no way to satisfy the inequality 11 b + 111 c < 1000 11b + 111c < 1000 .

Thus, the answer is 112 4 = 108 112 - 4 = \boxed{108} .

Billy Sugiarto
Sep 20, 2015

Its obvious that 7000 = 7 ( 1000 ) 7000 = 7(1000) .

Divide the problem into 10 cases which in the k t h k^{th} case 1000 = 111 k + m 1000 = 111k + m for a positive integer m m .

From the 10 cases we got n S n \in S with

S S = {28, 46, 55, 64, ..., 1000} = {28, 9(5) + 1, 9(6) + 1, ..., 9(111) + 1}.

It implies that there are exactly 108 positive integer n n possible.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...