How many 3-digit numbers divisible by 3 have no digits that are individually divisible by 3?

856 Views Asked by At

By manual counting, I reached an answer of 90.

However, I want to know the most efficient way possible, which would likely be complementary counting.

The number of 3 digit numbers divisible by 3 is $\frac{999}3-\frac{99}3=300$.

Let ABC be the three digit number (where A, B, and C are the digits).

Case 1: 3BC, 6BC, 9BC (BC is a 2-digit number where neither B nor c are divisible by 3.) There are $\frac{99}3-(4*4)+1=18$ of these cases. $18*3=54$

Case 2: A3C, A6C, A9C (AC is a 2-digit number where neither A nor C are divisible by 3. There are $\frac{99}3-(3*4)=21$ of these cases.) $21*3=63$

Case 3: AB3, AB6, AB9. It has the same number of cases as case 2. $21*3=63$

Case 4: The remainder of cases: $3*4*4=48$

$300-(54+63+63+28)=92$

Why is the efficient way wrong?

2

There are 2 best solutions below

2
On BEST ANSWER

There are two cases to consider. If we exclude the digit zero as divisible by 3 then we have just 6 digits to choose from, namely, 1, 2, 4, 5, 7, 8. To modulo 3 these are respectively, +1, -1, +1, -1, +1, -1. To make a three digit number divisible by 3 (because 10 is 1 modulo 3) we need all digits to be either +1 or all -1 modulo 3. This means that we can have 3x3x3 combinations of digits with +1 "parity" and the same number to -1, giving a total of 54 combinations.

Now, if we wish to include the digit zero, then we must have two digits of opposite "parity" with the zero in either the last or middle position. This gives 3x3x2 twice or 36 more - a total of 90 as you have counted manually.

0
On

The only allowed digits are $1,2,4,5,7,8$.

Modulo $3$, the options are $1$ or $2$.

Assume that you have picked the first two digits. If they are different modulo $3$, then there is no way to complete the number.

If the first two digits are congruent modulo $3$, then there are $3$ options for the last one. There are $6\times 3\times 3=54$ numbers so formed.