<s>[INST] To find the number of ways to put $14$ identical balls into $4$ bins with the condition that no bin can hold more than $7$ balls. To find the number of ways to put $14$ identical balls into $4$ bins with the condition that no bin can hold more than $7$ balls.

I have tried the following:
The total no of ways to distribute $14$ identical balls into $4$ bins without any restriction is $$\binom{14+4-1}{4-1}= \binom{17}{3}.$$
Note that there can't be two bins with more than $7$ balls since we have only $14$ identical balls only.
Now, we count the no. of ways so that one bin has more than $7$ balls. So, it has at least $8$ balls and the remaining $6$ can be distributed in $\binom{6+4-1}{4-1}= \binom{9}{3}$ ways. We can choose one bin out of $4$ in $4$ ways.
Hence the reqd number of ways = $$\binom{17}{3} - 4 \times \binom{9}{3}.$$
 [/INST] Your required sum is the coefficient of $x^{14}$ in
$$(1+x+\dots+x^7)^4$$
or
$$[x^{14}]:\left(\frac{1-x^8}{1-x}\right)^4$$
We can expand $(1-x^8)^4$ into $1-4x^8$, and the other term is $\sum_{i=0}^\infty \binom{i+3}{3}x^i$.
We want the values only when $i=6$ or $i=14$, which gives your equation.
</s>