2004 AIME II Problem 14

Below is the professionally curated solution for Problem 14 of the 2004 AIME II, from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2004 AIME II solutions, or check the answer key.

All of the real AMC 8, AMC 10, AMC 12, and AIME problems in our complete solution collection are used with official legal permission of the Mathematical Association of America (MAA).

Concepts:Diophantine Equationdigitscasework

Difficulty rating: 3270

14.

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

Solution:

Dividing by 77 turns the summands into 1,1, 11,11, or 111111 (no longer summand fits, since 1111>10001111 \gt 1000) and the target into 1000.1000. If x,x, y,y, zz count the summands of each size, then x+11y+111z=1000x + 11y + 111z = 1000 and n=x+2y+3z.n = x + 2y + 3z. Subtracting gives n=10009(y+12z),n = 1000 - 9(y + 12z), so the possible nn correspond exactly to the attainable values of v=y+12z.v = y + 12z.

The constraints are z9z \le 9 and 0y1000111z110 \le y \le \frac{1000 - 111z}{11} (then x0x \ge 0 follows). For z=0,1,,9z = 0, 1, \ldots, 9 the value v=y+12zv = y + 12z ranges over the intervals [0,90],[0, 90], [12,92],[12, 92], [24,94],[24, 94], [36,96],[36, 96], [48,98],[48, 98], [60,100],[60, 100], [72,102],[72, 102], [84,104],[84, 104], [96,106],[96, 106], and {108}\{108\} (when z=9,z = 9, only y=0y = 0 fits). Their union is every integer from 00 to 106106 together with 108;108; only 107107 is unattainable.

So vv takes 107+1=108107 + 1 = 108 values, and n=10009vn = 1000 - 9v takes 108108 values.

← Problem 13Full ExamProblem 15

Problem 14 in Other Years