2018 AMC 10 A

Complete problem set with solutions and individual problem pages

Problem 18 Medium

How many nonnegative integers can be written in the form a_7\cdot 3^7+a_6\cdot 3^6+a_5\cdot 3^5+a_4\cdot 3^4+a_3\cdot 3^3+a_2\cdot 3^2+a_1\cdot 3^1+a_0\cdot 3^0, where a_i\in \left\{-1,0,1 \right\} for 0\leqslant i\leqslant 7? (2018 AMC 10A Problem, Question#18)

  • A.

    512

  • B.

    729

  • C.

    1094

  • D.

    3281

  • E.

    59048

Answer:D

This looks like balanced ternary, in which all the integers with absolute values less than \frac{3^n}{2} are represented in n digits. There are 8 digits. Plugging in 8 into the formula for the balanced ternary gives a maximum bound of |x|=3280.5, which means there are 3280 positive integers, 0, and 3280 negative integers. Since we want all nonnegative integers, there are 3280+1=\boxed{3281} integers or \boxed{\rm D}.

Note that all numbers formed from this sum are either positive, negative or zero. The number of positive numbers formed by this sum is equal to the number of negative numbers formed by this sum, because of symmetry. There is only one way to achieve a sum of zero, if all a_i=0. The total number of ways to pick a_i from i=0, 1, 2, 3, \cdots 7 is 3^8=6561. \frac{6565-1}{2}=3280 gives the number of possible negative integers. The question asks for the number of nonnegative integers, so subtracting from the total gives 6561-3280=\boxed{3281}.

Note that the number of total possibilities (ignoring the conditions set by the problem) is 3^8=6561. So, \rm E is clearly unrealistic.

Note that if a_7 is 1, then it's impossible for a_7\cdot 3^7+a_6\cdot 3^6+a_5\cdot 3^5+a_4\cdot 3^4+a_3\cdot 3^3+a_2\cdot 3^2+a_1\cdot 3^1+a_0\cdot 3^0, to be negative. Therefore, if a_7 is 1, there are 3^7=2187 possibilities. (We also must convince ourselves that these 2187 different sets of coefficients must necessarily yield 2187 different integer results.)

As \rm A, \rm B, and \rm C are all less than 2187, the answer must be \boxed{\rm (D)~3281}.

Note that we can do some simple casework: If a_7=1, then we can choose anything for the other 7 variables, so this give us 3^7. If a_7=0 and a_6=1, then we can choose anything for the other 6 variables, giving us 3^6. If a_7=0, a_6=0, and a_5=1, then we have 3^5. Continuing in this vein, we have 3^7+3^6+\cdots +3^1+3^0  ways to choose the variables' values, except we have to add 1 because we haven't counted the case where all variables are 0. So our total sum is \boxed{\rm (D)~3281}. Note that we have counted all possibilities, because the largest positive positive power of 3 must be greater than or equal to the largest negative positive power of 3, for the number to be nonnegative.

The key is to realize that this question is basically taking place in a\in \left\{0,1,2 \right\} if each value of a was increased by 1, essentially making it into base 3. Then the range would be from 0\cdot 3^7+0\cdot 3^6+0\cdot 3^5+0\cdot 3^4+0\cdot 3^3+0\cdot 3^2+0\cdot 3^1+0\cdot 3^0=0 to 2\cdot 3^7+2\cdot 3^6+2\cdot 3^5+2\cdot 3^4+2\cdot 3^3+2\cdot 3^2+2\cdot 3^1+2\cdot 3^0=3^8-1=6561-1=6560, yielding 6561 different values.

Since the distribution for all a_i\in \left\{-1,0,1 \right\} the question originally gave is symmetrical, we retain the 3280 positive integers and one 0 but discard the 3280 negative integers. Thus, we are left with the answer, \boxed{\rm (D)~3281}.

First, set a_i=0 for all i\geqslant 1. The range would be the integers for which [-1,1]. If a_i=0 for all i\geqslant 2, our set expands to include all integers such that -4\leqslant \mathbf{Z}\leqslant 4. Similarly, when i\geqslant 3 we get -13\leqslant \mathbf{Z}\leqslant 13, and when i\geqslant 4 the range is -40\leqslant \mathbf{Z}\leqslant 40. The pattern continues until we reach i=7, where -3280\leqslant \mathbf{Z}\leqslant 3280. Because we are only looking for positive integers, we filter out all \mathbf{Z}<0, leaving us with all integers between 0\leqslant \mathbf{Z}\leqslant 3280, inclusive. The answer becomes \boxed{\rm (D)~3281}.

To get the number of integers, we can get the highest positive integer that can be represented using a_7\cdot 3^7+a_6\cdot 3^6+a_5\cdot 3^5+a_4\cdot 3^4+a_3\cdot 3^3+a_2\cdot 3^2+a_1\cdot 3^1+a_0\cdot 3^0, where a_i\in \left\{-1,0,1 \right\} for 0\leqslant i\leqslant 7.

Note that the least nonnegative integer that can be represented is 0, when all a_i=0. The highest number will be the number when all a_i=1. That will be 3^7+3^6+3^5+3^4+3^3+3^2+3^1+3^0=\frac{3^8-1}{3-1}=3280.

Therefore, there are 3280 positive integers and (3280+1) nonnegative integers (while including 0) that can be represented. Our answer is \boxed{\rm (D)~3281}.