Skip to main content

2018 AMC 10A Problem 18

Problem 18 of 25IntermediateNumber TheoryCounting & Probability

How many nonnegative integers can be written in the form a737+a636+a535a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a434+a333+a232+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a131+a030,+a_1\cdot3^1+a_0\cdot3^0, where ai{1,0,1}a_i\in \{-1,0,1\} for 0i7?0\le i \le 7?

Answer choices

Show solution

Solution

Note that every number formed by this sum is either positive, negative, or zero. The number of positive numbers equals the number of negative numbers due to symmetry (flip the 11 s to 1-1 s and 1-1 s to 11 s). The only way for the sum to be 00 is if all the coefficients are 0.0. The total number of numbers is 38=6561.3^8 = 6561. Because each power of 33 is larger than the sum of all previous powers of three, each combination of coefficients yields a different value. More explicitly, at the highest place where two combinations differ, the difference has magnitude at least 3k,3^k, while all lower places together can cancel at most 2(1+3++3k1)=3k1.2(1+3+\cdots+3^{k-1})=3^k-1. Therefore, there are 656112+1=3281 \dfrac{6561 - 1}{2} + 1 = 3281 distinct nonnegative integers. Thus, D is the correct answer.

More practice

Concepts: number base · symmetry · pairing and grouping

Problem text and solution from the LIVE past-contest archive. See also the AoPS wiki page for community solutions.