login
A035500
Shuffles at which new cards appear on top of deck in Guy's shuffling problem A035485.
3
0, 1, 2, 4, 5, 6, 8, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 25, 26, 28, 29, 30, 32, 33, 35, 37, 38, 39, 40, 44, 46, 47, 48, 49, 51, 52, 53, 54, 55, 57, 60, 62, 64, 65, 66, 72, 73, 76, 77, 78, 83, 84, 85, 86, 87, 88, 89, 90, 91, 94, 95, 97, 98, 99, 101, 102, 103, 104
OFFSET
1,3
REFERENCES
D. Gale, Mathematical Entertainments: "Careful Card-Shuffling and Cutting Can Create Chaos," 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
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
deck = []; tops = {1}; yield 0
for n in count(1):
deck += [2*n-1, 2*n]
first, next = deck[:n], deck[n:2*n]
deck[0:2*n:2], deck[1:2*n:2] = next, first
if deck[0] not in tops: tops.add(deck[0]); yield n
print(list(islice(agen(), 70))) # Michael S. Branicky, Aug 11 2022
CROSSREFS
KEYWORD
nonn
EXTENSIONS
Extended (and corrected) by Jud McCranie
STATUS
approved