Topswops (2): start by shuffling n cards labeled 1..n. If the top card is m, reverse the order of the top m cards. Repeat until 1 gets to the top, then stop. Suppose the whole deck is now sorted (if not, discard this case). a(n) is the maximal number of steps before 1 got to the top.
A000376
Topswops (2): start by shuffling n cards labeled 1..n. If the top card is m, reverse the order of the top m cards. Repeat until 1 gets to the top, then stop. Suppose the whole deck is now sorted (if not, discard this case). a(n) is the maximal number of steps before 1 got to the top.
Terms
- a(0) =0a(1) =1a(2) =2a(3) =4a(4) =7a(5) =10a(6) =16a(7) =22a(8) =30a(9) =38a(10) =51a(11) =63a(12) =80a(13) =101a(14) =112a(15) =130a(16) =159a(17) =191a(18) =207a(19) =231
External references
- oeis: A000376