Maths Olympiad Prep

Library / /332 of 860

Combinatorics Difficulty 5.1 AIME, harder Find the answer

Let SS be the smallest subset of the integers with the property that 0S0 \in S and for any xSx \in S, we have 3xS3 x \in S and 3x+1S3 x+1 \in S. Determine the number of non-negative integers in SS less than 2008.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Write the elements of SS in their ternary expansion (i.e. base 3 ). Then the second condition translates into, if d1d2dkS\overline{d_{1} d_{2} \cdots d_{k}} \in S, then d1d2dk0\overline{d_{1} d_{2} \cdots d_{k} 0} and d1d2dk1\overline{d_{1} d_{2} \cdots d_{k} 1} are also in SS. It follows that SS is the set of nonnegative integers whose tertiary representation contains only the digits 0 and 1. Since 236<2008<372 \cdot 3^{6}<2008<3^{7}, there are 27=1282^{7}=128 such elements less than 2008 . Therefore, there are 128 such non-negative elements.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.