Variation of the Josephus problem Suppose we have a circle of $2n$ people, where the first $n$ people are good guys and the people $n+1$ to $2n$ are bad guys. Can we always choose an integer $q$, such that if we execute successively every $q$-th person in the circle, the $n$ good guys will survive.
I tried to solve a few simple cases, and found the following examples:
$$
\begin{array}{c|cccc}
n & 1 & 2 & 3 & 4 \\
\hline
q & 2 & 7 & 5 & 30
\end{array}
$$
But I haven't found a general approach yet. How to tackle it?

This won't necessarily produce the smallest integer $q$, but it does produce an integer that works:  Let $q=\text{lcm}(n+1,n+2,\ldots,2n)$. Such a $q$ will knock of the bad guys in reverse order, starting with person $2n$ and ending with person $n+1$.
Remark:  If you don't mind a much larger number, or don't want to bother computing a least common multiple, $q=(2n)!$ will do the trick.
