Can someone check which logic is finally correct?:
In how many ways can three numbers be selected from the numbers $1,2,\dots,300$ such that their sum is divisible by $3$?
I found different answers about the exact question but everyone states something different.
Dividing $\{1, \dots , 300\}$ into three groups $(A,B,C)$ where each one of them has $100$ numbers in it and ${}\bmod 3$ results in $0$ or $1$ or $2$ seems correct as a first step.
Then if we want the sum of the three numbers to be divisible by $3$ we should take cases:
- All of them belong to one of the groups: $ {{100}\choose{3}} + {{100}\choose{3}} + {{100}\choose{3}} $
- We take one from each group: $ {{100}\choose{1}} × {{100}\choose{1}} × {{100}\choose{1}} $
The answer ends there by adding the above numbers (because one
of them can happen).
But what about combinations such as: Taking one number from the group that gives remainder $1$ and two numbers from the group that gives remainder $2$??