<s>[INST] If $a+b+c+d=12$; $ 0≤a, b, c, d≤ 6$ and none of $a,b,c,d$ equals $3$, what is the number of possible solutions for $(a, b, c, d)$? If $a+b+c+d=12$; $ 0≤a, b, c, d≤ 6$ and none of $a,b,c,d$ equals $3$, what is the number of possible solutions for $(a,b,c,d)$?
I need to solve it using combinatorics.
I've started with calculating the number of possible solutions  without restrictions and I am stuck.
 [/INST] The straightforward way to get the result is to compute the coefficient of $X^{12}$ in $(1+X+X^2+X^4+X^5+X^6)^4$. Though computing that coefficient basically amounts to counting solutions explicitly in a systematic manner, it is not so hard to do even by hand: $$(1+X+X^2+X^4+X^5+X^6)^2=\\1+2X+3X^2+2X^3+3X^4+4X^5+6X^6+4X^7+3X^8+2X^9+3X^{10}+2X^{11}+X^{12},$$
and from there one easily sees the required coefficient is $2\times(1^2+2^2+3^2+2^2+3^2+4^2)+6^2=122$.
I can also propose a more ad hoc method that might be slightly easier (because fewer and smaller numbers are involved) if one were not allowed to use pen and paper. Most of the solutions will involve two of $a,b,c,d$ being${}<3$ and the other two being${}>3$, the exceptions being the permutations of $(0,4,4,4)$ and of $(2,2,2,6)$, which are $8$ solutions. For the remaining solutions that do have a $2$-$2$ split, there are $\binom42=6$ ways to choose the larger positions, and after we have attributed the minimum of $4$ units to those two positions, we must still distribute the remaining $12-8=4$ units over the $4$ positions, while never putting more than $2$ of those units together. By an argument similar to the one used above, that amounts to finding the coefficient of $X^4$ in $(1+X+X^2)^4$, and from $(1+X+X^2)^2=1+2X+3X^2+2X^3+X^4$ one finds that the number is $1^2+2^2+3^2+2^2+1^2=19$. All in all $6\times19+8=122$ solutions are possible.
</s>