Our frequent contributor Prof. Stewart is back with a bit of permutation prestidigitation: The great stage magician Harry Whodunni shuffles a pack of (more than two) cards in the following simple way: he moves the top card to the next-to-bottom position, and then turns the whole pack over (which has the side effect of turning each card upside-down).
How many times must he repeat this shuffle to get all cards back in their original positions, and the same way up?