Jump to ContentJump to Main Navigation
Show Summary Details
More options …

Recreational Mathematics Magazine

2 Issues per year

Mathematical Citation Quotient (MCQ) 2016: 0.05

Open Access
See all formats and pricing
More options …

On a Mathematical Model for an Old Card Trick

Roy Quintero
Published Online: 2017-06-09 | DOI: https://doi.org/10.1515/rmm-2017-0014


The three-pile trick is a well-known card trick performed with a deck of 27 cards which dates back to the early seventeenth century at least and its objective is to uncover the card chosen by a volunteer. The main purpose of this research is to give a mathematical generalization of the three-pile trick for any deck of ab cards with a, b ≥ 2 any integers by means of a finite family of simple discrete functions. Then, it is proved each of these functions has just one or two stable fixed points. Based on this findings a list of 222 (three-pile trick)-type brand new card tricks was generated for either a package of 52 playing cards or any appropriate portion of it with a number of piles between 3 and 7. It is worth noting that all the card tricks on the list share the three main properties that have characterized the three-pile trick: simplicity, self-performing and infallibility. Finally, a general performing protocol, useful for magicians, is given for all the cases. All the employed math techniques involve naive theory of discrete functions, basic properties of the quotient and remainder of the division of integers and modular arithmetic.

Keywords: Modular arithmetic; fixed point theory of discrete functions; three-pile trick


  • [1] Bachet, C. G. Probl`emes plaisans et d´electables, qui se font par les nombres, partie recueillis de divers autheurs, et inventez de nouveau, avec leur d´emonstration, par Claude Gaspar Bachet, Sr. de M´eziriac. Tr`es utiles pour toutes sortes de personnes curieuses qui se servent d’arithm´etique (1612). Edition consulted: C. Bachet, Probl`emes plaisants et d´electables qui se font par les nombres, Gauthier-Villars, Paris, 1884.Google Scholar

  • [2] Ball, W. W. R., Coxeter, H. S. M. Mathematical Recreations and Essays and Problems of Past and Present Times, Macmillan, London & New York, 1892.Google Scholar

  • [3] Bolker, E. “Gergonne’s card trick, positional notation, and radix sort”, Mathematics Magazine, 83, 46-49, 2010.Google Scholar

  • [4] Champanerkar, J., Jani, M. “Stable Fixed Points of Card Trick Functions”, arXiv:1308.3396v1[math.HO], 1-10, 2013.Google Scholar

  • [5] Dickson, L. “Gergonne’s pile problem”, Bull. Amer. Math. Soc., 1, 184-186, 1895.Google Scholar

  • [6] Gardner, M. Mathematics Magic and Mystery, Dover Publications Inc., Mineola, N. Y., 1956.Google Scholar

  • [7] Gergonne, J. D., “R´ecr´eations Math´ematiques: Recherches sur un tour de cartes”, Annales de Math´ematiques Pures et Appliqu´ees, 4, 276-283, 1813-1814.Google Scholar

  • [8] Harrison, J., Brennan, T., Gapinski, S. “The Gergonne p-pile problem and the dynamics of the function x 7→ ⌊(x + r)/p⌋”, Discrete Applied Mathematics, 82, 103-113, 1998.Google Scholar

  • [9] Hudson, C. T. “Solution of question 2594”, Educational Times Reprints, 9, 89-91, 1868.Google Scholar

  • [10] Hugard, J. Encyclopedia of card tricks, Faber and Faber, London, 1937.Google Scholar

  • [11] Quintero, R., Gerini, C. “Le≪tour de cartes≫de Gergonne”, Quadrature, 78, 8-17, 2010.Google Scholar

  • [12] Quintero, R. “Un algoritmo basado en el formalismo de aplicaci´on-c´odigo”, 2do. Congreso Venezolano de Ciencia, Tecnolog´ıa e Innovaci´on, 7th-10th November, Caracas, Venezuela, 2013.Google Scholar

About the article

Published Online: 2017-06-09

Published in Print: 2017-05-24

Citation Information: Recreational Mathematics Magazine, Volume 4, Issue 7, Pages 65–77, ISSN (Online) 2182-1976, DOI: https://doi.org/10.1515/rmm-2017-0014.

Export Citation

© 2017. This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License. BY-NC-ND 4.0

Comments (0)

Please log in or register to comment.
Log in