A060750 Step at which card n appears on top of deck for first time in Guy's shuffling problem A035485.
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
References
- See A035490 for references, links and programs.
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
Comments