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.

A264386 Gergonne's 27-card trick with three piles: finding a card after three dealings with pile information.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Dec 22 2015

Keywords

Comments

See the links for J. D. Gergonne's 27-card trick with three piles each of 9 cards. Putting the told pile (the one with the card to be found) at the top (t), the middle (m) or the bottom (b) at each of the three dealings with three piles allows 3^3 = 27 possibilities. They are ordered lexicographically using t = 0, m = 1 and b = 2. The a(n)-th card from the top of the 27-card pile at the end is the card to be found for these 27 possible shufflings. E.g., a(2) gives the number for the shuffling (2)_3 = 002 (in the three-position base-3 version): the told 9-pile is first put on top, then again on top and finally at the bottom, denoted by ttb. Then the searched card is the 19th from the top of the 27-card pile.
In the Gardner reference the numbers to be added to obtain a(n) are for t, m, b for the first dealing 1, 2, 3, for the second one 0, 3, 6 and the third one 0, 9, 18, respectively. Hence for a(2) corresponding to ttb one finds 1 + 0 + 18 = 19.
This sequence (with offset 1) is the following element of the symmetric group S_27 (in cycle notation of type 1^9 2^8): (1) (4) (7) (11) (14) (17) (21) (24) (27) (2,10) (3,19) (5,13) (6,22) (8,16) (9,25) (12,20) (15,23) (18,26).
a(0)..a(17) coincides with A030102(9)..A030102(26).

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.

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