Suppose we have a set of $n$ elements which we would like to permute. Let $\begin{pmatrix} i & j\end{pmatrix}$ denote the transposition (the swapping) of elements $i$ and $j$.
I would like to prove that $(\begin{pmatrix} 1 & 2\end{pmatrix}\begin{pmatrix} 2 & 3\end{pmatrix}\ldots\begin{pmatrix} n-1 & n\end{pmatrix})^m$ has exactly one orbit if and only if $m$ and $n$ are relatively prime.
I'm very stuck on how to prove this.
Without loss of generality, let us take the left-to-right composition convention (i.e., assume that the permutation is acting from the right).
Then simply observe that the permutation $\pi = ((1\ 2)(2\ 3) \cdots (n-1\ n))$ maps each $i$ to $i - 1 \mod n$ (so, $1 \mapsto n = 0$; $2 \mapsto 1$, …, $n \mapsto n - 1$).
Thus, $\pi^m$ maps each $i$ to $i - m \mod n$. Now, let $k$ ($1 \le k \le n$) be the length of the cycle containing $1$ in the cyclic decomposition of $\pi^m$. That is, $k$ is the least positive integer such that $$1 \mapsto (1 - m) \mapsto (1 - 2m) \mapsto \cdots \mapsto (1 - (k - 1)m) \mapsto (1 - km) = 1.$$
That is, $k$ is the least positive integer such that $km \equiv 0 \mod n$. Then $k = n$ if and only if $m$ and $n$ are relatively prime. Note that there is exactly one cycle in the decomposition if and only if $k = n$.