How many 5-digit numbers divisible by 3 are there, which contain the digit 6?
I. solution. Group the five-digit numbers containing 6 and divisible by 3 according to the position of the last 6 from the units place.

The first group includes numbers whose last digit is 6. To form such a number, we freely choose the three middle digits, and then we choose the first digit from the 9 possible digits (since 0 cannot be the first digit) such that the sum of the digits is divisible by 3. For each of the middle digits, there are 10 possibilities, and for the first digit, there are 3 possibilities depending on the sum of the already chosen digits (either 1, 4, 7 or 2, 5, 8 or 3, 6, 9). Therefore, the number of numbers in the first group is \(3 \cdot 10^3 = 3000\).

For the second, third, and fourth groups, the tens, hundreds, or thousands place is 6, and no 6 appears after this digit. To form such a number, the digits following the 6 can be freely chosen from 9 possible digits (since 6 is not allowed), and the other digits (except the first) can be freely chosen from 10 possible digits. The first digit must be chosen such that the sum of all digits is divisible by 3, which gives 3 possibilities. Therefore, the number of numbers in these groups is \(3 \cdot 10^2 \cdot 9 = 2700\), \(3 \cdot 10 \cdot 9^2 = 2430\), and \(3 \cdot 9^3 = 2187\) respectively.

For the fifth group, the ten-thousands place is 6, and no other digit is 6. To form such a number, the three middle digits can be freely chosen from 9 possible digits (since 6 is not allowed), and the last digit must be chosen such that the sum of all digits is divisible by 3. Depending on the sum of the other digits, the last digit can be chosen from 1, 4, 7 or 2, 5, 8 or 0, 3, 9, giving 3 possibilities. Therefore, the number of numbers in the fifth group is \(3 \cdot 9^3 = 2187\).

In total, the number of numbers in all groups is \(3000 + 2700 + 2430 + 2187 + 2187 = 12504\).

II. solution. First, determine the number of five-digit numbers containing 6, regardless of whether they are divisible by 3. Then, prove that exactly one-third of these numbers are divisible by 3.

1. Let \(f(n)\) denote the number of \(n\)-digit numbers containing 6. Consider the \((n+1)\)-digit numbers containing 6 and group them into two categories: those whose last digit is 6 and those whose last digit is not 6.

The first category includes numbers obtained by appending a 6 to any \(n\)-digit number. The number of such numbers is the same as the number of \(n\)-digit numbers, which is \(10^n - 10^{n-1}\).

The second category includes numbers obtained by appending a digit other than 6 to an \(n\)-digit number containing 6. Since there are 9 such digits, the number of such numbers is \(9 f(n)\).

Thus, the total number of \((n+1)\)-digit numbers containing 6 is

\[
f(n+1) = 10^n - 10^{n-1} + 9 f(n)
\]

Since there is only one 1-digit number containing 6, \(f(1) = 1\). Using this initial value and the derived recurrence relation, we get \(f(2) = 18\), \(f(3) = 252\), \(f(4) = 3168\), and \(f(5) = 37512\).

2. It is clear that if the number of elements in an arithmetic sequence is divisible by 3 and the common difference is 1 modulo 3, then exactly one-third of the elements are divisible by 3. This statement also holds for the union of multiple such sequences, provided they have no common elements. To prove that one-third of the five-digit numbers containing 6 are divisible by 3, we need to group these numbers into disjoint arithmetic sequences with 3 elements and a common difference of 1 modulo 3. This can be done as follows:

Numbers ending in 6 form an arithmetic sequence starting at 10006 and ending at 99996, with 9000 elements and a common difference of 10. Numbers ending in other digits are grouped such that only the last digit differs. In each group, numbers ending in 0, 1, 2, 3, 4, 5 form a 6-element sequence with a common difference of 1, and numbers ending in 7, 8, 9 form a 3-element sequence with a common difference of 1.

Since all these sequences meet our criteria, we have proven that one-third of the five-digit numbers containing 6 are divisible by 3, which is \(37512 / 3 = 12504\).

III. solution. Again, first determine the total number of five-digit numbers containing 6, and then prove that one-third of these numbers are divisible by 3.

1. There are 90000 five-digit numbers in total. Determine the number of five-digit numbers not containing 6. Such a number is obtained by choosing the first digit from the 8 digits excluding 0 and 6, and the other four digits from the 9 digits excluding 6. The number of five-digit numbers not containing 6 is \(8 \cdot 9^4 = 52488\). Therefore, the number of five-digit numbers containing 6 is \(90000 - 52488 = 37512\). This is a number divisible by 3.
2. Write down the five-digit