<s>[INST] Coefficient of generating function (hard) How to find the coefficient of $x^{46}$ in $\dfrac{1}{1 - x^3 -x^4 -x^{20}}$ without software like Maple?
I tried everything... :(
 [/INST] $$\frac{1}{1-x^3-x^4-x^{20}}=\sum_{k\geq 0}(x^3+x^4+x^{20})^k $$
and the coefficient of $x^{46}$ in $(x^3+x^4+x^{20})^k$ is the cardinality of the $k$-uples with coordinates in $\{3,4,20\}$ such that the sum of the coordinates equals $46$. We either use two $20s$ and two $3$s (which can be arranged in six ways), a single $20$ and a representation of $46-20=26$ as a sum of $3s$ and $4s$, or just a representation of $46$ with $3$s and $4$s only. In the last cases we need an even number of $3$s since both $26$ and $46$ are even, but at least two $3s$ since neither $26$ or $46$ is a multiple of $4$. The count can be performed by hand now:
$$(3,3,20,20)$$
$$(3,3,4,4,4,4,4,20)$$
$$(3,3,3,3,3,3,4,4,20)$$
$$(3,3,4,4,4,4,4,4,4,4,4,4)$$
$$(3,3,3,3,3,3,4,4,4,4,4,4,4)$$
$$(3,3,3,3,3,3,3,3,3,3,4,4,4,4)$$
$$(3,3,3,3,3,3,3,3,3,3,3,3,3,3,4)$$
together with their anagrams give all the chances and
$$ [x^{46}]\frac{1}{1-x^3-x^4-x^{20}}=\color{red}{3224}.$$
</s>