The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A264386 Gergonne's 27-card trick with three piles: finding a card after three dealings with pile information. 1
 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 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). 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. 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.) EXAMPLE 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. CROSSREFS Cf. A030102. Sequence in context: A171767 A153689 A240022 * A173822 A122607 A113703 Adjacent sequences: A264383 A264384 A264385 * A264387 A264388 A264389 KEYWORD nonn,base,fini,full AUTHOR Wolfdieter Lang, Dec 22 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 29 06:08 EDT 2023. Contains 361596 sequences. (Running on oeis4.)