Arrangements with no anomalous neighborhoods How many ways can $8$ boys and $20$ girls be ordered such that for each boy at position $i$, there is no neighborhood (of $2n+1$ points with $n > 0$)  consisting of positions $j \in [i-n,i+n]$ that has a majority of boys?
For example, with $2$ boys and $n$ girls there are $\binom{n+1}{2}$ valid orderings.  Note that if there is a boy on either end, then there are no neighborhoods to check for that boy, but the next one in order must be a girl, because otherwise the $3$-neighborhood centering on the second boy will be male-dominated.
The usual approach to problems requiring ordering of $x$'s and $y$'s with no two  $x$'s touching is to pretend that each $x$ has a $y$ glued to its right; you have to two two such cases to pick of the arrangements ending in $x$. But the type of problem posed involves arbitrarily large neighborhoods, so this technique does not, naively, apply.
Any good trick for this?  It should also solve the case of $b$ boys and $g> b$ girls.  
 A: The conditions are already fulfilled if they're fulfilled for $n=1$ and $n=2$, that is, for triples and quintuples. The triples condition implies that no two boys are adjacent. It follows that for any $n=2k+1$, the neighbourhood consists of a triple and $2k$ adjacent pairs which each contain at most one boy; and for any $n=2k$ the neighbourhood consists of a quintuple and $2k-2$ such adjacent pairs.
If we fulfill the triple conditions by glueing a girl to the right of every boy,  we just have to prevent $3$ adjacent glued pairs, since that's the only way to create an inadmissible quintuple. This yields the generating function
$$
\frac{1+x+xy+xyx+xyxy}{1-(1+xy+x^2y^2)y}\;,
$$
where $x$ counts boys, $y$ counts girls, the denominator represents any number of blocks consisting of up to two boy/girl pairs and a girl, and the numerator contains the various ways we can end at the right. This is
\begin{align}
x+x^2y+\frac{\left(1+xy+x^2y^2\right)^2}{1-(1+xy+x^2y^2)y}=x+x^2y+\sum_{k=0}^\infty y^k\left(1+z+z^2\right)^{k+2}\;,
\end{align}
with $z=xy$. We want the coefficient of $x^by^g$ in this expression. We can ignore the first two terms, which correspond to one boy and one girl and two boys, respectively, since you specified $g\gt b$. In the series, only the term $k=g-b$ has the right excess of girls over boys. So we want the coefficient of $z^b$ in $(1+z+z^2)^{g-b+2}$. This is
$$
\sum_k\binom{g-b+2}{k,b-2k,g-2b+k+2}\;,
$$
where the $k$-th term represents $k$ factors of $z^2$, $b-2k$ factors of $z$ and $g-2b+k+2$ factors of $1$.
In your example, $b=8$ and $g=20$, so the sum is
\begin{align}
\sum_k\binom{14}{k,8-2k,6+k}
&=\binom{14}{0,8,6}+\binom{14}{1,6,7}+\binom{14}{2,4,8}+\binom{14}{3,2,9}+\binom{14}{4,0,10}
\\
&=93093\;.
\end{align}
Here's code that checks this result by enumerating the arrangements.
