[Math] In how many ways we can choose three numbers the set of first $11$ natural numbers $(1,2,\cdots,11)$ so that their sum is a multiple of $3$

combinatoricscontest-mathelementary-number-theory

In how many ways we can choose three numbers from first $11$ natural numbers $(1,2,\cdots,11)$ so that their sum is a multiple of $3$?

I tried using "stars and bars", but as this is about selection i.e $(1,2,3)$ is same as $(3,2,1)$ it's not giving the right answer, any other ideas?

Best Answer

You might as well work modulo $3$. So what you have are three $0$s, four $1$s and four $2$s, and you need to select combinations that add up to $0$ mod $3$.