How many three-digit positive integers $x$ are there with the property that $x$ and $2 x$ have only even digits? (One such number is $x=420$, since $2 x=840$ and each of $x$ and $2 x$ has only even digits.)
(A) 64
(B) 18
(C) 16
(D) 125
(E) 100
Solution 1

Suppose $x$ has digits $p q r$.

Since $x$ can only have even digits, then $p$ is 2, 4, 6 or 8 and each of $q$ and $r$ can be $0,2,4,6$ or 8 .

When $x$ is multiplied by 2 , each digit is multiplied by 2 , and some "carrying" may occur.

Note that $2 \times 0=0,2 \times 2=4,2 \times 4=8,2 \times 6=12$, and $2 \times 8=16$.

So when $2 x$ is calculated, each digit from $x$ will initially produce a corresponding even digit in $2 x$ and a carry of 0 or 1 .

If the carry is 0 , whether the next digit to the left in $2 x$ is even or odd is not affected.

If the carry is 1 , the next digit to the left in $2 x$ will be changed from even to odd. (Note that the carry can never be made larger than 1 by extra carrying into a given digit.)

Therefore, no digit of 6 or 8 can appear in $x$, since if a 6 or 8 appears in $x$, an odd digit in $2 x$ is guaranteed.

Also, digits of 0,2 and 4 can occur in any position (except no 0 in the leading position) as they will always produce an even digit in $2 x$.

Therefore, there are 2 possible values for $p$ and 3 each for $q$ and $r$, giving $2 \times 3 \times 3=18$ possible values for $x$.

## Solution 2

Suppose $x$ has digits $p q r$, so $x=100 p+10 q+r$.

Since $x$ can only have even digits, then $p$ is $2,4,6$ or 8 and each of $q$ and $r$ can be $0,2,4,6$ or 8.

When $x$ is multiplied by 2 , each digit is multiplied by 2 , and some "carrying" may occur.

Note that $2 \times 0=0,2 \times 2=4,2 \times 4=8,2 \times 6=12$, and $2 \times 8=16$.

Suppose $2 p=10 A+a, 2 q=10 B+b, 2 r=10 C+c$, where $A, a, B, b, C, c$ are all digits with $A, B, C$ each 0 or 1 and $a, b, c$ each even.

Then

$$
\begin{aligned}
2 x & =2(100 p+10 q+r) \\
& =100(2 p)+10(2 q)+2 r \\
& =100(10 A+a)+10(10 B+b)+10 C+c \\
& =1000 A+100 a+100 B+10 b+10 C+c \\
& =1000 A+100(a+B)+10(b+C)+c
\end{aligned}
$$

Since $a, b, c$ are each at most 8 and $A, B, C$ are each at most 1 , then $a+B$ and $b+C$ are each at most 9 , so each of $A, a+B, b+C$ and $c$ are indeed digits.

For $2 x$ to have even digits only, then $A$ must be even (so must be 0 ), $c$ must be even (which it is), and $a+B$ and $b+C$ must both be even.

Since $a$ and $b$ are both even, this means that $B$ and $C$ must both be even, so must both be 0 . Since $A, B$ and $C$ are all 0 , then none of $p, q$ or $r$ can be 6 or 8 , and each can be 0,2 or 4 (except $p \neq 0$ ).

Therefore, there are 2 possible values for $p$ and 3 each for $q$ and $r$, giving $2 \times 3 \times 3=18$ possible values for $x$.

ANsWER: (B)