D25. Whodunni’s Shuffle

Contributed by Ian Stewart, University of Warwick

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?

This problem originally appeared in the Prisoner’s Dilemma in the 2025 Spring issue of the PMP Newsletter. Solutions will be accepted through 2025 Jul 15.