0
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ You include for example 1234 in the count of the first set because it is a multiple of 3 when the first digit is removed. It does not have the property that you can remove any other digit and have it be divisible by 3. $\endgroup$ May 6, 2023 at 8:09
  • 1
    $\begingroup$ All 4 digits must have the same value when considered modulo 3, $\endgroup$
    – user317176
    May 6, 2023 at 8:14

1 Answer 1

3
$\begingroup$

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.

$\endgroup$
4
  • $\begingroup$ Great answer! Just something to clarify. Why is the equation you added $3∗(9/3)^4=243$ and how did you figure this out? Thanks. $\endgroup$ May 6, 2023 at 8:33
  • $\begingroup$ @JonathanXu The $(9/3)^4=81$ part refers to four numbers with each say $\equiv 0 \mod 3$. The tripling then accounts for numbers with $\equiv 1 \mod 3$ and $\equiv 2\mod 3$. Example for the latter: 5555, which always yields 555 (div. by 3), but 5 $\equiv 2 \mod 3$. $\endgroup$
    – Piita
    May 6, 2023 at 10:05
  • $\begingroup$ Thanks, @Piita. I discussed exactly in that way. $\endgroup$
    – Ayaka
    May 6, 2023 at 12:12
  • $\begingroup$ @Ayaka Sure! Feel free to copypaste / paraphrase this into an edit, will then delete comment $\endgroup$
    – Piita
    May 6, 2023 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .