A080346 First card number to reach the top of the deck n times in Guy's shuffle (see A035485).
2, 1, 14, 14, 38, 14, 38, 157, 1, 16929, 170, 170, 170, 170, 170, 170, 170896, 170896, 170
Offset: 1
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.
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
Comments