# Let $S = \{1,2,3,…,1992\}$ find the number of subsets $\{a,b,c\}$ such that $3\mid(a+b+c)$.

Let $S = \{1,2,3,...,1992\}$ find the number of subsets $\{a,b,c\}$ such that $3\mid(a+b+c)$.

I managed to solve the same problem but with 2-elements sets in the following way: Make the following partition of $S$ -$\{\{1,2,3\},\{4,5,6\},...,\{1990,1991,1992\}\}$ and lets call for convenience every subset a group. There are 664 groups in total. If you choose an arbitrary element, not divisible by 3, say $2$, you can combine it with $664$ other elements such that their sum is divisible by $3$ (in the case of $2$ for example these elements are every "first" element in each group, so $1,4,7,10...$). There are $1328$ numbers in $S$ which are not divisible by $3$, so $\frac{1}{2}1328\times 664 = 440896$ $2$-element subsets so far. There are also $664$ numbers divisible by 3 in S, so there is a total of $664\times 663 + 440896 = 881128$ 2-elements subsets.

The problem is that I cannot extend this idea to 3-element subsets and it was the only reasonable one I had, so I am asking for ideas to solve this problem.

Hint: How many subsets of the form $\{0 \mod 3, 0 \mod 3, 0 \mod 3\}$ are there? How many of the form $\{0 \mod 3, 1 \mod 3, 2 \mod 3\}$ are there? How many of the form $\{1 \mod 3, 1 \mod 3, 1 \mod 3\}$ are there? How about $\{2 \mod 3, 2 \mod 3, 2 \mod 3\}$? Would any other subset satisfy the needed rule?