You have a deck of 52 cards - for convenience, number them 1 through 52. You cut the cards into two equal halves and shuffle them perfectly. That is, the cards were in the order
and now they are
1,27,2,28,...,26,52. Let's call this a perfect in-shuffle.
If you repeat this in-shuffling process, how many in-shuffles will it take for the deck to return to its initial ordering (taking for granted that the cards will eventually do so)?
How does the solution change if you have a deck of 64 cards, or 10, or in general, n cards? For odd integer values of n, in-shuffling will take 1,2,3,...,n to 1,(n+3)/2,2,(n+5)/2,...,n,(n+1)/2. For example, when n=5, the first in-shuffle yields 1,4,2,5,3.
(In reply to re(2): Making a sequence (spoilers on the numbers)
Charlie: Your numbers agree with http://www.research.att.com/cgi-bin/access.cgi/as/njas/sequences/eisA.cgi?Anum=A024222
Name: Shuffles (perfect faro shuffles with cut) required to return a deck of
size n to original order.
References Tim Folger, "Shuffling Into Hyperspace," Discover, Jan 1991 (vol 12,
no 1), pages 66-67.
Martin Gardner, "Card Shuffles," Mathematical Carnival chapter 10,
pages 123-138. New York: Vintage Books, 1977.
S. Brent Morris, Magic Tricks, Card Shuffling and Dynamic Computer
Memories, Math. Assoc. Am., 1998, p. 107.
Example: a(52)=8: a deck of size 52 returns to original order in 8 perfect faro
See also: A002326 is really the fundamental sequence for this problem."
The A002326 sequence gives
Name: Multiplicative order of 2 mod 2n+1.
Comments: Number of riffle shuffles of 2n cards required to return a deck to
initial state. A riffle shuffle replaces a list s(1), s(2), ..., s(m) by
s(1), s((i/2)+1), s(2), s((i/2)+2), ...
In other words, least k such that (2n+1) divides (2^k-1)."
These also give references to interesting printed and online articles.
Posted by Richard
on 2004-05-20 00:04:46