[Math] Determine the number of these subsets for which the sum of the three elements is a multiple of 3. [Read Full Q. Below]

combinationscombinatoricselementary-set-theoryinclusion-exclusionpermutations

Consider the collection of all three-element subsets drawn from the set ${1,2,3,4,…, 299, 300}$. > Determine the number of these subsets for which the sum of the three elements is a multiple of 3.

This is a question from the Chapter Combinatorics but from what I understood of the question, I tried to find a pattern between subsets from which I found that the sum of all consecutive 3 positive integers is a multiple of 3, meaning if repetition isn't allowed, the three-element subsets would be $100$

I can't find a solution if repetition is allowed so please verify my answer if repetition isn't allowed and answer the question thinking it is allowed.

EDIT/UPDATE: IF repetition is allowed and we take the fact that the sum of all 3 consecutive integers is a multiple of 3 then each consecutive set {1, 2, 3},
{4, 5, 6}, will have 3 more sets for example the first will also be viable for
{2, 3, 4}, {3, 4, 5}; also, a set with the same number repeating 3 times would also be a multiple of 3 so the final answer would be $3 * 100 + 300 = 600$
Would this be correct?

Best Answer

I'm considering the problem on top of your question. There is no "consecutive" involved, and "repetition" does not occur in sets.

We have $x_1+x_2+x_3=0$ modulo $3$ iff either all $x_i$ have different remainders modulo $3$, or all $x_i$ have the same remainder modulo $3$. It follows that there are $${100\choose1}^3+3{100\choose3}=1\,485\,100$$ three-element subsets of $[300]$ whose sum is divisible by $3$.