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.

A080346 First card number to reach the top of the deck n times in Guy's shuffle (see A035485).

Original entry on oeis.org

2, 1, 14, 14, 38, 14, 38, 157, 1, 16929, 170, 170, 170, 170, 170, 170, 170896, 170896, 170
Offset: 1

Views

Author

Jud McCranie, Feb 16 2003, revised Mar 08 2003

Keywords

Comments

Card #1 being at the top before the first shuffle is not counted. The number of shuffles is in A080347. Card 170 reaches the top for the 15th time after 5886828 shuffles and for the 16th time after 9140809 shuffles, so a(15) and a(16) may be 170. [This was confirmed by performing 10^7 shuffles. - Frank A. Stevenson, Feb 04 2024]
Possible next term is 170896 which appears for the 20th time after 158538523553 shuffles. - Frank A. Stevenson, Feb 09 2024

Examples

			Card #14 is the first card to reach the top position 3 times (after 41 shuffles) and is the first card to do so, so a(3)=14.
		

Crossrefs

Programs

  • Python
    # outputs: n, A080346(n), A080347(n)
    from collections import Counter
    def find_terms(max_shuffles):
      deck, times_on_top = [i for i in range(1, 2*max_shuffles+1)], Counter()
      alst, shuffles, n = [1], 0, 1
      while shuffles < max_shuffles:
        shuffles += 1
        first, next = deck[:shuffles], deck[shuffles:2*shuffles]
        deck[0:2*shuffles:2], deck[1:2*shuffles:2] = next, first
        times_on_top[deck[0]] += 1
        if times_on_top[deck[0]] == n: print(n, deck[0], shuffles); n += 1
    find_terms(35000) # Michael S. Branicky, Feb 01 2021

Extensions

Definition corrected by Lambert Klasen (vim(AT)gmx.li), Feb 08 2008
a(15)-a(16) confirmed by Frank A. Stevenson, Feb 04 2024
a(17)-a(19) from Frank A. Stevenson, Feb 09 2024