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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A035493 Order in which new cards appear on top of deck in Guy's shuffling problem A035485. 10
1, 2, 3, 6, 5, 9, 4, 16, 10, 12, 14, 23, 18, 20, 17, 27, 30, 33, 38, 37, 32, 11, 19, 53, 25, 21, 34, 8, 50, 48, 46, 47, 84, 52, 31, 49, 51, 91, 61, 42, 79, 29, 26, 115, 70, 93, 109, 124, 97, 134, 111, 7, 129, 131, 157, 107, 123, 117, 96, 94, 72, 178, 86, 35, 121 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
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
Eric Weisstein's World of Mathematics, Perfect Shuffle.
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
deck = []; tops = {1}; yield 1
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 deck[0]
print(list(islice(agen(), 65))) # Michael S. Branicky, Aug 11 2022
CROSSREFS
Sequence in context: A329564 A257011 A144652 * A363277 A070038 A328638
KEYWORD
nonn
AUTHOR
EXTENSIONS
Extended (and corrected) by Jud McCranie
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 10:01 EDT 2024. Contains 371779 sequences. (Running on oeis4.)