A264386 Gergonne's 27-card trick with three piles: finding a card after three dealings with pile information.
1, 10, 19, 4, 13, 22, 7, 16, 25, 2, 11, 20, 5, 14, 23, 8, 17, 26, 3, 12, 21, 6, 15, 24, 9, 18, 27
Offset: 0
Examples
The 27 possible positions for the told pile of 9 cards after the three dealings are ordered like ttt, ttm, ttb, tmt, tmm, tmb, tbt, tbm, tbb, mtt, mtm, mtb, mmt, mmm, mmb, mbt, mbm, mbb, btt, btm, btb, bmt, bmm, bmb, bbt, bbm, bbb. They correspond to the three-position version of n in base 3, for n=0..26. The Gardner counting for mmb (n=14) is 2 + 3 + 18 = 23 = a(14). The formula uses (14)_3 = 112, reversed 211, written as decimal 2*9 + 1*3 + 1*1 = 18 + 3 + 1 = 22, adding 1 gives a(14) = 23.
References
- M. Gardner, Mathematische Zaubereien, Dumont, 2004, pp. 50-52. Original: Mathematics, Magic and Mystery, Dover, 1956.
Links
- Ethan D. Bolker, Gergonne's Card Trick, Positional Notation and Radix Sort, Mathematics Magazine Vol. 83, No. 1 (February 2010), pp. 46-49.
- MacTutor History of Mathematics archive, Joseph Diaz Gergonne .
- Wikipedia, Joseph Diaz Gergonne.
Crossrefs
Cf. A030102.
Formula
a(n) = (reversed((n)_3))_10 + 1, n = 0 .. 26, where (n)_3 is the three position version of n in base 3. E.g., (4)_3 = 011, reversed 110, as decimal 9+3+0 = 12, adding 1 gives a(4) = 13.
a(n) = n_1 + n_2 + n_3 with n_1 = 1, 2, 3, n_2 = 0, 3, 6 and n_3 = 0, 9, 18, for t, m, b, respectively, at the i-th dealing, i = 1, 2, 3.
E.g., tmm (or 011): a(4) = 1 + 3 + 9 = 13. (Gardner, p. 51.)
Comments