Problem 500: (2018 AMC 12b, 15)
How many odd positive $3$-digit integers are divisible by $3$ but do not contain the digit $3$?
$\textbf{(A)}\ 96 \qquad \textbf{(B)}\ 97 \qquad \textbf{(C)}\ 98 \qquad \textbf{(D)}\ 102 \qquad \textbf{(E)}\ 120$
- The allowed digits are $\{0,1,2,4,5,6,7,8,9\}$, with residues mod $3$: $0$: $\{0,6,9\}$, $1$: $\{1,4,7\}$, $2$: $\{2,5,8\}$. The units digit is odd: $1,5,7,9$, with residues $1,2,1,0$.
- The second digit is uniform over the residues ($3$ each), so the first two digits ($8\cdot9=72$ choices) give each residue sum exactly $24$ times.
- For each, the units digit must make the sum $\equiv0$: residue $0$ needs $9$ ($1$ way), residue $2$ needs $1$ or $7$ ($2$ ways), residue $1$ needs $5$ ($1$ way).
- Total: $24(1+2+1)=96$.
- The answer is (A).
How many odd positive $4$-digit integers are divisible by $3$ but do not contain the digit $5$?