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!)
A035500 Shuffles at which new cards appear on top of deck in Guy's shuffling problem A035485. 3

%I #16 Aug 11 2022 14:48:24

%S 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,

%T 33,35,37,38,39,40,44,46,47,48,49,51,52,53,54,55,57,60,62,64,65,66,72,

%U 73,76,77,78,83,84,85,86,87,88,89,90,91,94,95,97,98,99,101,102,103,104

%N Shuffles at which new cards appear on top of deck in Guy's shuffling problem A035485.

%D D. Gale, Mathematical Entertainments: "Careful Card-Shuffling and Cutting Can Create Chaos," Mathematical Intelligencer, vol. 14, no. 1, 1992, pages 54-56.

%D D. Gale, Tracking the Automatic Ant and Other Mathematical Explorations, A Collection of Mathematical Entertainments Columns from The Mathematical Intelligencer, Springer, 1998.

%H Lars Blomberg, <a href="/A035500/b035500.txt">Table of n, a(n) for n = 1..10000</a>

%o (Python)

%o from itertools import count, islice

%o def agen(): # generator of terms

%o deck = []; tops = {1}; yield 0

%o for n in count(1):

%o deck += [2*n-1, 2*n]

%o first, next = deck[:n], deck[n:2*n]

%o deck[0:2*n:2], deck[1:2*n:2] = next, first

%o if deck[0] not in tops: tops.add(deck[0]); yield n

%o print(list(islice(agen(), 70))) # _Michael S. Branicky_, Aug 11 2022

%Y Cf. A035485, A035493, A035501.

%K nonn

%O 1,3

%A _N. J. A. Sloane_, _Wouter Meeussen_

%E Extended (and corrected) by _Jud McCranie_

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 19 04:35 EDT 2024. Contains 371782 sequences. (Running on oeis4.)