A riffle shuffle, in which the top half of the deck is placed in the left hand, and cards are then alternatively
interleaved from the left and right hands. Using an in-shuffle, a deck originally
arranged as 1 2 3 4 5 6 7 8 would become 5 1 6 2 7 3 8 4. The ordering of a deck
of 52 cards after an in-shuffle is given by 27, 1, 28, 2, 29, 3, ... (Sloane's A059952).
In general, in-shuffling a deck of cards once moves
card to the position originally occupied by the th card (mod ) (Conway and
Guy 1996). Therefore, in-shuffling an even number of cards times when is prime results in the original card order. This means that
an ordinary deck of 52 cards is returned to its original order after 52 in-shuffles.
The numbers of in-shuffles needed to return a deck of , 4, ... to its
original order are 2, 4, 3, 6, 10, 12, 4, 8, 18, 6, 11, ... (Sloane's A002326), which is simply the multiplicative order of 2 (mod ).
Conway, J. H. and Guy, R. K. "Fractions Cycle into Decimals." In The Book of Numbers. New York: Springer-Verlag, pp. 163-165,
1996.
Sloane, N. J. A. Sequences A002326/M0936 and A059952 in "The On-Line Encyclopedia of Integer Sequences."
|