Consider the set of numbers $\{0,1,2,3,…,9 \}$ , now we want the number of ways to find three digit strings such that the string is divisible by three (with repetition).
For example,
012 is a good because twelve is divisible by three
009 is good because it is also divisible by three
031 is not because it is not divisible by three
My thought was to use divisibility rules, we can find that the problem can be found equivalent to finding the number of solutions to the equation:
$$ a+b+c = 3n$$
Where $n$ is some integer and $(a,b,c)$ represents the number we picked from the set. For example, $(0,1,2)$ would mean the number 012 and that's divisible by three because
$$ 0 + 1 + 2 = 3n$$
Which is true when $n=1$
Now, a way to solve this would be to use brute force counting but I'm hoping for a better way to count using combinatronics
Best Answer
HINT
Split the digits up into $\{0,3,6,9\},\{1,4,7\},\{2,5,8\}$.
You must use three from the same set or one from each set.