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
Lars Blomberg, Table of n, a(n) for n = 1..10000
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
AUTHOR
EXTENSIONS
Extended (and corrected) by Jud McCranie
STATUS
approved