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!)
A035492 Position of card 1 after n-th shuffle in Guy's shuffling problem (A035485). 8
1, 2, 4, 1, 2, 4, 8, 1, 2, 4, 8, 16, 7, 14, 28, 25, 17, 34, 31, 23, 5, 10, 20, 40, 31, 11, 22, 44, 31, 3, 6, 12, 24, 48, 27, 54, 35, 70, 63, 47, 13, 26, 52, 17, 34, 68, 43, 86, 75, 51, 1, 2, 4, 8, 16, 32, 64, 13, 26, 52, 104, 85, 45, 90, 51 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,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.
MATHEMATICA
Transpose[Position[NestList[riguy, {}, 64], 1]][[2]] (* See A035490. *)
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
deck = []; 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
yield deck.index(1) + 1
print(list(islice(agen(), 65))) # Michael S. Branicky, Aug 11 2022
CROSSREFS
Sequence in context: A062039 A352866 A352883 * A101229 A057176 A194671
KEYWORD
nonn
AUTHOR
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 June 26 10:51 EDT 2024. Contains 373718 sequences. (Running on oeis4.)