TOPICS
Search

In-Shuffle


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, ... (OEIS A059952).

In general, in-shuffling a deck of 2n cards once moves card k to the position originally occupied by the (2k)th card (mod 2n+1) (Conway and Guy 1996). Therefore, in-shuffling an even number n of cards n times when n+1 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 n=2, 4, ... to its original order are 2, 4, 3, 6, 10, 12, 4, 8, 18, 6, 11, ... (OEIS A002326), which is simply the multiplicative order of 2 (mod 2n+1).


See also

Out-Shuffle, Riffle Shuffle

Explore with Wolfram|Alpha

WolframAlpha

More things to try:

References

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."

Referenced on Wolfram|Alpha

In-Shuffle

Cite this as:

Weisstein, Eric W. "In-Shuffle." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/In-Shuffle.html

Subject classifications