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.

This page as a plain text file.
%I A264386 #19 Dec 25 2015 21:50:44
%S A264386 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,
%T A264386 27
%N A264386 Gergonne's 27-card trick with three piles: finding a card after three dealings with pile information.
%C A264386 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.
%C A264386 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.
%C A264386 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).
%C A264386 a(0)..a(17) coincides with A030102(9)..A030102(26).
%D A264386 M. Gardner, Mathematische Zaubereien, Dumont, 2004, pp. 50-52. Original: Mathematics, Magic and Mystery, Dover, 1956.
%H A264386 Ethan D. Bolker,  <a href="http://www.jstor.org/stable/10.4169/002557010X479983?seq=1#/page_scan_tab_contents">Gergonne's Card Trick, Positional Notation and Radix Sort</a>, Mathematics Magazine Vol. 83, No. 1 (February 2010), pp. 46-49.
%H A264386 MacTutor History of Mathematics archive, <a href="http://www-groups.dcs.st-and.ac.uk/~history/Biographies/Gergonne.html">Joseph Diaz Gergonne </a>.
%H A264386 Wikipedia, <a href="https://en.wikipedia.org/wiki/Joseph_Diaz_Gergonne">Joseph Diaz Gergonne</a>.
%F A264386 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.
%F A264386 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.
%F A264386   E.g., tmm (or 011): a(4) = 1 + 3 + 9 = 13. (Gardner, p. 51.)
%e A264386 The 27 possible positions for the told pile of 9 cards after the three dealings are ordered like
%e A264386   ttt, ttm, ttb, tmt, tmm, tmb, tbt, tbm, tbb,
%e A264386   mtt, mtm, mtb, mmt, mmm, mmb, mbt, mbm, mbb,
%e A264386   btt, btm, btb, bmt, bmm, bmb, bbt, bbm, bbb.
%e A264386   They correspond to the three-position version of n in base 3, for n=0..26.
%e A264386 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.
%Y A264386 Cf. A030102.
%K A264386 nonn,base,fini,full
%O A264386 0,2
%A A264386 _Wolfdieter Lang_, Dec 22 2015