Neil & others, There's something wrong with A000375 & A000376 (or with me). The first says A000375 Topswops (1): shuffle n cards labeled 1..n. If top card is m, reverse order of top m cards. a(n) is max number of steps before top card is 1. 0, 1, 2, 4, 7, 10, 16, 22, 30, 38, 51, 65, 80, 101, 113, 139 The second says A000376 Topswops (2): shuffle n cards labeled 1..n. If top card is m, reverse order of top m cards. a(n) is max number of steps before deck is sorted. 1, 2, 4, 7, 10, 16, 22, 30, 38, 51, 63, 80, 101, 112, 130, 159 In the ordinary way, the deck will not get sorted, since once 1 has come to the top, no more sorting will take place. Somewhat artificially, when 1 comes to the top, you could put it aside and then reduce all the numbers on the other cards by 1 and repeat. It would be good to have some examples of what is going on. With 4 cards there are just two perms which require 4 flips: 3142 --> 4132 --> 2314 --> 3214 --> 1234 2413 --> 4213 --> 3124 --> 2134 --> 1234 In these cases the deck finishes up sorted. Is this always the case if you start with a perm which requires the max number of flips? If so, then the two sequences should be the same. R.