Question : I wanted to find out the number of ways all the 7 numbers below could be assigned positive integers which can sum up to 42.$$x_1+x_2+x_3+x_4+x_5+x_6+x_7=42$$
the catch in this problem is the constraint $$ 1\le x_i\le26$$ The Stars and bars method happen to only provide solution for, if the $x_i$ should be non-negative or only positive.
My Approach : Since i need only positive integers to be used here for $x_i$, so i have to use $${n - 1\choose k-1}.$$ but in using the formulae directly, definitely it would also count the ways where a certain $x_i>26$, so i thought i should use it this way, as $k=7=1+6=2+5=...=6+1$ and $n=42=26+16$, so i can select a few stars from 26 stars as well as 16 stars at the same time : $$({26-1\choose 1-1} + {16-1\choose 6-1}) + ({26-1\choose 2-1} + {26-1\choose 5-1}) + .......+ ({26-1\choose 6-1} + {16-1\choose 1-1})$$ so that highest value $x_i$ can achieve is 26.
My problem : I actually don't know if my way is correct or if any other such method exists to use stars and bars method where also constraints on number of stars are included. Thank you.