cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A024222 Number of shuffles (perfect faro shuffles with cut) required to return a deck of size n to its original order.

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 3, 3, 6, 6, 10, 10, 12, 12, 4, 4, 8, 8, 18, 18, 6, 6, 11, 11, 20, 20, 18, 18, 28, 28, 5, 5, 10, 10, 12, 12, 36, 36, 12, 12, 20, 20, 14, 14, 12, 12, 23, 23, 21, 21, 8, 8, 52, 52, 20, 20, 18, 18, 58, 58, 60, 60, 6, 6, 12, 12, 66, 66, 22, 22, 35, 35, 9, 9, 20, 20
Offset: 1

Views

Author

Keywords

Examples

			a(52)=8: a deck of size 52 returns to its original order in 8 perfect faro shuffles.
		

References

  • Martin Gardner, "Card Shuffles," Mathematical Carnival chapter 10, pp. 123-138. New York: Vintage Books, 1977.
  • S. Brent Morris, Magic Tricks, Card Shuffling and Dynamic Computer Memories, Math. Assoc. Am., 1998, p. 107.

Crossrefs

A002326 is really the fundamental sequence for this problem. Cf. A024542.

Programs

A049206 Maximum mean distance between cards during perfect faro shuffles, with cut, to return to original order in A024222.

Original entry on oeis.org

0, 1, 1, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 9, 10, 11, 11, 11, 12, 13, 13, 13, 14, 15, 15, 15, 16, 17, 17, 17, 18, 19, 19, 19, 20, 21, 21, 21, 22, 23, 23, 23, 24, 25, 25, 25, 26, 27, 27, 27, 28, 29, 29, 29, 30, 31, 31, 31, 32, 33, 33, 33, 34, 35, 35, 35, 36, 37, 37, 37
Offset: 1

Views

Author

Keywords

Examples

			Consider n=6. There are 4 shuffles to return to original order in a 6-card deck. The maximum mean distance between cards during these 4 shuffles and cuts, s1-s4, is 3, computed as follows: s1, 415263, cut, 263415; s2, 421653, cut 653421; s3, 462513, cut 513462; s4, 456123, cut, 123456. Mean distances: s1 15/5=3, maximum; s2 7/5=1.4; s3 13/5=2.6; s4 5/5; mean cumulative distance: 40/20=2.
		

Crossrefs

Formula

Take difference between successive cards after each shuffle. Compute mean (if necessary, round to nearest integer). Retain until replaced by a higher mean in a succeeding shuffle.
(1/4) {2n + 2 - (-1)^[n/2] + (-1)^[(n-1)/2] }. - Ralf Stephan, Jun 10 2005
a(n)=A004525(n), n>1. [From R. J. Mathar, Oct 15 2008]
Showing 1-2 of 2 results.