Is the resulting $3$-digit number divisible by $3$

contest-mathnumber theory

From the 2012 Australian Mathematical Competition (Junior Level):

How many four-digit numbers containing no zeros have the property that whenever any its four digits is removed, the resulting three-digit number is divisible by $3$?

To solve this problem, I listed 4 cases

  1. If the 1st digit is deleted then the remaining number would have to be a multiple of $3$. That means that there are $10 \cdot 10 \cdot 3 = 300$ cases.

  2. If the 2nd digit is deleted then the remaining number would have to be a multiple of $3$. That means that there are $10 \cdot 10 \cdot 3 = 300$ cases.

  3. If the 3rd digit is deleted then the remaining number would have to be a multiple of $3$. That means that there are $10 \cdot 10 \cdot 3 = 300$ cases.

  4. If the 4th digit is deleted then the remaining number would have to be a multiple of $3$. That means that there are $10 \cdot 10 \cdot 3 = 300$ cases.

So there are $1200$ cases but this is wrong.

Best Answer

A number is divisible by 3 iff its sum of digits is divisible by 3. Using this fact, it is easy to see that our 4-digit number satisfies the given condition iff the four digits all have the same remainder modulo 3. Therefore, we have $3*(9/3)^4=243$ cases when each digit is nonzero.