cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-7 of 7 results.

A035485 Card on top of deck at n-th stage of R. K. Guy's shuffling problem.

Original entry on oeis.org

1, 2, 3, 1, 6, 5, 9, 1, 4, 2, 16, 10, 12, 14, 23, 16, 18, 20, 17, 27, 30, 33, 38, 10, 14, 37, 32, 6, 11, 19, 53, 37, 25, 21, 12, 34, 38, 8, 50, 48, 46, 14, 18, 23, 47, 53, 84, 52, 31, 49, 1, 51, 91, 61, 42, 79, 4, 29, 6, 49, 26, 23, 115, 4, 70, 93, 109, 11, 16, 19, 49, 18, 124, 97, 70, 10, 134, 111, 7, 38, 14, 79, 11, 129
Offset: 0

Views

Author

Keywords

Comments

At n-th step, pick up top n cards and interlace them with the next n.
Here is the deck after steps 0,1,2,3,4,5:
1,2,3,4,5,6,7,...
2,1,3,4,5,6,7,...
3,2,4,1,5,6,7,...
1,3,5,2,6,4,7,8,9,...
6,1,4,3,7,5,8,2,9,10,...
It is conjectured that eventually every number appears on top of the deck.
See A035491 for (the relevant part of) the deck after the n-th step. - M. F. Hasler, Aug 13 2022

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.

Crossrefs

See A035491 for the array, also A035490, A035492.

Programs

  • PARI
    A035485(n)=A035491_row(n+!n)[1]-!n \\ M. F. Hasler, Aug 13 2022
  • Python
    def aupton(terms):
      alst, deck = [1], list(range(1, 2*terms+1))
      for n in range(1, terms+1):
        first, next = deck[:n], deck[n:2*n]
        deck[0:2*n:2] = next
        deck[1:2*n:2] = first
        alst.append(deck[0])
      return alst
    print(aupton(83)) # Michael S. Branicky, Feb 01 2021
    

Formula

a(n) = A035491(n,1), i.e., the first element of the n-th row of that table, for all n > 0. - M. F. Hasler, Aug 13 2022

Extensions

More terms from Jud McCranie

A035494 Order in which record high new cards appear for first time on top of deck in Guy's shuffling problem A035485.

Original entry on oeis.org

1, 2, 3, 6, 9, 16, 23, 27, 30, 33, 38, 53, 84, 91, 115, 124, 134, 157, 178, 222, 241, 267, 277, 298, 323, 368, 378, 407, 438, 450, 495, 496, 542, 546, 555, 561, 576, 581, 598, 619, 646, 665, 703, 750, 774, 782, 806, 860, 862, 864, 905, 909, 937, 976, 1005, 1052, 1056, 1121, 1152, 1197, 1241, 1269, 1316
Offset: 1

Views

Author

Keywords

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.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        deck = []; record = 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] > record: record = deck[0]; yield record
    print(list(islice(agen(), 63))) # Michael S. Branicky, Aug 11 2022

Formula

Monotonic subsequence of A035493.

Extensions

More terms from Jud McCranie

A035493 Order in which new cards appear on top of deck in Guy's shuffling problem A035485.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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.

Crossrefs

Programs

  • 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

Extensions

Extended (and corrected) by Jud McCranie

A060750 Step at which card n appears on top of deck for first time in Guy's shuffling problem A035485.

Original entry on oeis.org

3, 1, 2, 8, 5, 4, 78, 37, 6, 11, 28, 12, 349, 13, 383, 10, 18, 16, 29, 17, 33, 210, 14, 133, 32, 60, 19, 106, 57, 20, 48, 26, 21, 35, 97, 217, 25, 22, 13932, 863, 205, 54, 30452, 306, 2591, 40, 44, 39, 49, 38, 51, 47, 30, 252992198, 2253, 101, 112, 246, 402, 119, 53, 139
Offset: 1

Views

Author

David W. Wilson, Apr 22 2001

Keywords

Comments

Card #1 is initially at the top of the deck and next appears at the top of the deck after 3 shuffles. Here we do not accept 0 as a valid number of shuffles and so we say that card #1 first shows up on top after 3 shuffles. A060751 and A060752 also adopt this convention. Alternatively, we can say that card #1 first shows up on top after 0 shuffles; this leads to sequences A035490, A057983, A057984, etc.

References

  • See A035490 for references, links and programs.

Crossrefs

Programs

  • Python
    def a(n):
      deck = list(range(1, 2*maxcards+1))
      for step in range(1, maxcards+1):
        first, next = deck[:step], deck[step:2*step]
        deck[0:2*step:2] = next
        deck[1:2*step:2] = first
        if deck[0] == n: return step
      return '>' + str(step)
    maxcards = 31000
    print([a(n) for n in range(1, 54)]) # Michael S. Branicky, Mar 01 2021

A057976 Number of shuffles where card 1 reaches a record depth (A057975) under the shuffle in A035485.

Original entry on oeis.org

1, 2, 6, 11, 14, 17, 23, 27, 33, 35, 37, 47, 60, 71, 89, 108, 110, 119, 124, 141, 149, 156, 174, 189, 209, 246, 275, 279, 301, 320, 347, 350, 364, 388, 452, 459, 509, 566, 571, 618, 638, 667, 675, 711, 737, 771, 797, 870, 906, 931, 947, 952, 1017, 1100, 1143
Offset: 0

Views

Author

Jud McCranie, Oct 22 2000

Keywords

Comments

The depths of card 1 after this number of shuffles are given in A057975.

Examples

			Card 1 reaches a depth of 8 after 6 shuffles, so 6 is in the sequence.
		

Crossrefs

A035499 Turns at which card 1 surfaces in Guy's shuffling problem (A035485).

Original entry on oeis.org

0, 3, 7, 50, 93, 307, 832, 3345, 7438, 32327, 12165645, 861940477, 2151642067, 29933164804, 39288453372, 713937018048, 4426276078818, 19966143995933
Offset: 0

Views

Author

Keywords

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.

Crossrefs

Cf. A035485, A035490-A035494. Gives terms where 1's appear in A035492.

Extensions

More terms from David W. Wilson; and later from Jud McCranie, Oct 22 2000
a(15)-a(17) from Mark R. Diamond, Apr 20 2014

A057975 Record depths reached by card 1 in the shuffle in A035485.

Original entry on oeis.org

2, 4, 8, 16, 28, 34, 40, 44, 48, 54, 70, 86, 104, 112, 148, 160, 202, 204, 234, 272, 286, 312, 324, 366, 418, 474, 518, 530, 540, 564, 608, 678, 706, 748, 816, 902, 996, 1100, 1106, 1220, 1266, 1302, 1320, 1418, 1422, 1456, 1574, 1736, 1764, 1816, 1838, 1862
Offset: 0

Views

Author

Jud McCranie, Oct 22 2000

Keywords

Comments

The shuffle number reaching these terms are in A057976.

Examples

			Card 1 reaches a depth of 8 after 6 shuffles, so 8 is in the sequence.
		

Crossrefs

Showing 1-7 of 7 results.