The other day, in a popular-science book, I saw:
Given 32 cards ($c_i$ for $i=0..31$), cut the deck into two parts and shuffle them the American way (riffle shuffling). The deck now looks like: $c_0, c_{16}, c_1, c_{17}, \dots, c_{15}, c_{31}$.
The fact is, by repeating this shuffle 5 times in total, you will go back to the initial ordered state of the deck. Some close-up magicians can use this result to pretend having a randomly shuffled deck.
I found that really cool, but, somehow, I needed to prove it. Looking for simple example as a starting point I got that for a 4-card-deck, it's easy to see that you only need two shuffles: $$(c_0,c_1,c_2,c_3)\rightarrow(c_0,c_2,c_1,c_3)\rightarrow(c_0,c_1,c_2,c_3)$$
The generalized version I came up is what I want to prove: For $2^n$ cards, you need $n$ shuffles to go back to the initial state.
Recursion?
I wanted to do it by recursion, and I got stuck pretty soon. The only useful (I hope) tool I found is an algebric representation of the shuffling. If the current state of the deck is ($c_i$ for $i=0..2^n$), then after shuffling it will become ($c_{f(i)}$ for $i=0..2^n$), with: $$f(i) = 2^{n-1} i + \left\lfloor\frac{i}{2}\right\rfloor \pmod{2^n}$$
With this tool, I "only" have to prove $\forall i, f^n(i) = f\circ f \circ \dots \circ f(i) = i$.
Does anyone can help me to prove this theorem?
And, as suggested, it would be awesome to prove that this is the minimum number of times needed.
Edit: There has been a lot of work as the references of this sequence. This is the generalized case (not only $2^n$ cards). I think this is a good thing to look at.
Your tool is almost right. The idea is to work with the reversed shuffle. That is to say $(c_0,c_1,c_2,c_3,c_4,c_5,c_6,c_7)\rightarrow(c_0,c_2,c_4,c_6,c_1,c_3,c_5,c_7)$.
The last card $c_{2^n-1}$ never move. For the other cards, you can find the recursion formula $f^{-1}(i)=2i \pmod{(2^n-1)}$. So we have
$$\begin{align} (f^{-1})^n(i) & =2^ni & \pmod{(2^n-1)}\\ &=(2^n-1)\times i+i&\pmod{(2^n-1)}\\ &=i&\pmod{(2^n-1)} \end{align}$$
So, we proved it for the reversed shuffle! (And, consequently, for the initial shuffle $f$).
Now to see that $n$ is the order of $f^{-1}$ and not a divisor of $n$ we observe how the cyclic group generated by $f^{-1}$ acts on the numbers $(1,\ldots,2^n-1)$. The orbits have all size a divisor of $n$. Now to prove that there is actually an orbit of order $n$ we note that this is the case for the orbit of $1$. Indeed we have that this orbit is $1,2,2^2,\dots, 2^{n-1}$. These are all $< 2^n-1$ so all different modulo $(2^n-1)$ and there are exactly $n$ of them.