Stars and bars with at least 1 group of 2 adjacent bars I am trying to figure out the number of $n$ permutations for $N$ stars and $K \ge{2}$ bars such that there is at least 1 group of 2 adjacent bars.
For example, in this trivial example $N = 1$ and $K = 3$ then $n = 4$
$|||* \\ ||*| \\ |*|| \\ *|||$
This coincides with your typical counting argument $\frac{4!}{3!1!}$. However, for a more non-trivial example where $N = 2$ and $K = 3$, we have $n = 9$.
My initial instinct was to group the 2 bars as a "group" and permute it with the rest of the stars and bars (so for $N = 2$ and $K = 3$, we have $\frac{4!}{1!1!2!} = 12 \ne 9$).
The only counting argument I can come up with is to find the total # of permutations and subtract the # of permutations where there are no adjacent bars ($\frac{5!}{3!2!} - 1 = 9$), but this would involve tedious case work with groups of $*|*$ for the # of perms without adjacent bars. Clearly this does not work when $K > 2N$.

HINT: It’s probably easiest to count the arrangements that do not have two adjacent bars and subtract from $\binom{N+K}N$, the total number of possible arrangements. 
If there are no adjacent bars, of course, we must have $K\ge N-1$. Put one star in each slot between adjacent bars; that leaves $K-(N-1)=K-N+1$ stars to be distributed arbitrarily amongst the $N+1$ possible slots (including the two end slots).
