This is a question I posted on math.stackexchange.com before but never got an answer. I am cross-posting it here.

Define a permutation $\sigma$ on the set $X=\{1,2,...,n\}$, $n$ is a natural number as follows. Given a non-negative integer $k$, let $s(k)=\frac{b+1}{2}$, where $b=\max\limits_c\big(c2^k\le n, c\text{ is an odd natural number}\big)$. For each $x\in X$, $x=a2^k$, where $a$ is an odd natural number and $k$ a non-negative integer. Define $$f(x) = \sum_{i=0}^{k-1}s(i)+\frac{a+1}{2},$$ and $$\sigma(x)=n+1-f(x).$$

This permutation is equivalent to the following playing card shuffling process. Given a stack of cards, counting from the top first card, take all the odd numbered cards, one by one put them with the latter one on top of the previous one and form another stack. Repeat the previous procedure on the leftover first stack with the current withdrawn cards placed on top of the second stack. Repeat this procedure until the first stack is exhausted. The final second stack is the original first stack permuted described in the first paragraph.

What can we say about the cycle structure of this permutation? What is the least common multiplier of all the cycle lengths? Is the least common multiplier of all the cycle length the maximal cycle length?

Perhaps we may start with $n=2^j$ for any natural number $j$ and recurs on $j$.

As an example, for $n=16$, the inverse of $f$ or $f^{-1}(X)$ \begin{pmatrix} 1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16 \\ 1&3&5&7&9&11&13&15&2&6&10&14&4&12&8&16 \end{pmatrix}

and the permutation $\sigma(X)$ is

\begin{pmatrix} 1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16 \\ 16&8&15&4&14&7&13&2&12&6&11&3&10&5&9&1 \end{pmatrix}

The cycle structure is $$(4)(11)(1\ 16)(2\ 8)(5\ 14)(3\ 15\ 9\ 12)(6\ 7\ 13\ 10).$$ Here the maximal cycle length is $4$ and is the least common multiplier of all the cycle lengths.