A035485 Card on top of deck at n-th stage of R. K. Guy's shuffling problem.
1, 2, 3, 1, 6, 5, 9, 1, 4, 2, 16, 10, 12, 14, 23, 16, 18, 20, 17, 27, 30, 33, 38, 10, 14, 37, 32, 6, 11, 19, 53, 37, 25, 21, 12, 34, 38, 8, 50, 48, 46, 14, 18, 23, 47, 53, 84, 52, 31, 49, 1, 51, 91, 61, 42, 79, 4, 29, 6, 49, 26, 23, 115, 4, 70, 93, 109, 11, 16, 19, 49, 18, 124, 97, 70, 10, 134, 111, 7, 38, 14, 79, 11, 129
Offset: 0
References
- D. Gale, Mathematical Entertainments: "Careful Card-Shuffling and Cutting Can Create Chaos," The Mathematical Intelligencer, vol. 14, no. 1, 1992, pages 54-56.
- D. Gale, Tracking the Automatic Ant and Other Mathematical Explorations, A Collection of Mathematical Entertainments Columns from The Mathematical Intelligencer, Springer, 1998.
Links
- Lars Blomberg, Table of n, a(n) for n = 0..10000
- Eric Weisstein's World of Mathematics, Perfect Shuffle.
Programs
-
PARI
A035485(n)=A035491_row(n+!n)[1]-!n \\ M. F. Hasler, Aug 13 2022
-
Python
def aupton(terms): alst, deck = [1], list(range(1, 2*terms+1)) for n in range(1, terms+1): first, next = deck[:n], deck[n:2*n] deck[0:2*n:2] = next deck[1:2*n:2] = first alst.append(deck[0]) return alst print(aupton(83)) # Michael S. Branicky, Feb 01 2021
Formula
a(n) = A035491(n,1), i.e., the first element of the n-th row of that table, for all n > 0. - M. F. Hasler, Aug 13 2022
Extensions
More terms from Jud McCranie
Comments