How many non-negative integer solutions are there for $a+b+c+d=25$ if $a\geq 1, b\geq 2,c\leq 6,d\leq 14$
So first I let $x= a-1$, $y=b-2$ and get:
$x+y+c+d=22$
And if all are non-negative I get that there are ${n+k-1\choose k-1} ={25\choose 3}$ solutions
Then I need to subtract the solutions where $c\geq 7,d\geq 15$
Let $z= c-7$ then $x+y+z+d=15$ and there are ${18\choose 3}$ non negative solutions
Let $w= d-15$ then $x+y+c+w=7$ and there are ${10\choose 3}$ non negative solutions.
And combining $z= c-7, w=d-15$ gives $x+y+z+w=0$, which will have only $1$ solution
So there are ${25\choose 3}-{18\choose 3}-{10\choose 3}-1$ solutions.
Does this seem correct?