How many four-digit positive integers $x$ are there with the property that $x$ and $3 x$ have only even digits? (One such number is $x=8002$, since $3 x=24006$ and each of $x$ and $3 x$ has only even digits.)
(A) 82
(B) 84
(C) 86
(D) 88
(E) 90
For $x$ and $3 x$ to each have even digits only, $x$ must be in one of the following forms. (Here, $a$, $b, c$ represent digits that can each be 0,2 or 8 , and $n$ is a digit that can only be 2 or 8 .)

- $n a b c(2 \times 3 \times 3 \times 3=54$ possibilities $)$
- $n a 68(2 \times 3=6$ possibilities $)$
- $n 68 a(2 \times 3=6$ possibilities $)$
- $68 a b(3 \times 3=9$ possibilities $)$
- $n 668$ ( 2 possibilities)
- $668 a$ (3 possibilities)
- 6668 (1 possibility)
- 6868 (1 possibility)

In total, there are 82 possibilities for $x$.

In general terms, these are the only forms that work, since digits of 0,2 and 8 in $x$ produce even digits with an even "carry" ( 0 or 2 ) thus keeping all digits in $3 x$ even, while a 6 may be used, but must be followed by 8 or 68 or 668 in order to give a carry of 2 .

More precisely, why do these forms work, and why are they the only forms that work?

First, we note that $3 \times 0=0,3 \times 2=6,3 \times 4=12,3 \times 6=18$ and $3 \times 8=24$.

Thus, each even digit of $x$ will produce an even digit in the corresponding position of $3 x$, but may affect the next digit to the left in $3 x$ through its "carry".

Note that a digit of 0 or 2 in $x$ produces no carry, while a digit of 8 in $x$ produces an even carry. Therefore, none of these three digits can possibly create an odd digit in $3 x$ (either directly or through carrying), as they each create an even digit in the corresponding position of $3 x$ and do not affect whether the next digit to the left is even or odd. (We should note that the carry into any digit in $3 x$ can never be more than 2 , so we do not have to worry about creating a carry of 1 from a digit in $x$ of 0 or 2 , or a carry of 3 from a digit of 8 in $x$ through multiple carries.) So a digit of 2 or 8 can appear in any position of $x$ and a digit of 0 can appear in any position of $x$ except for the first position.

A digit of 4 can never appear in $x$, as it will always produce a carry of 1 , and so will always create an odd digit in $3 x$.

A digit of 6 can appear in $x$, as long as the carry from the previous digit is 2 to make the carry forward from the 6 equal to 2 . (The carry into the 6 cannot be larger than 2.) When this happens, we have $3 \times 6+$ Carry $=20$, and so a 2 is carried forward, which does not affect whether next digit is even or odd.

A carry of 2 can occur if the digit before the 6 is an 8 , or if the digit before the 6 is a 6 which is preceded by 8 or by 68 .

Combining the possible uses of $0,2,6$, and 8 gives us the list of possible forms above, and hence 82 possible values for $x$.