- 11 Feb '13 10:29Start with a deck of cards, in order, by suit and number;

Ace of clubs, 2C, 3C, ..., KC, AD, 2D, ..., KD, AH, 2H, .., KH, AS, 2S, ... KS.

Deal the deck into four hands of 13 cards each, so the first hand consists of AC, 5C, 9C etc, the last card the ten of spades.

* does any hand have a pair of cards of the same number?

Stack the four hands as a pile, first hand on top, then 2nd, 3rd, and 4th, and deal out again for four new hands.

* how many times do you need to repeat this to end up with a deck where the cards are in the original order, AC, 2C, ... KS ? - 14 Feb '13 06:55The simulation gives a brute force answer easily, but is not really elegant. Unless of course the number is fairly small, which it is, and one uses real cards, which is not an option here. A mathematical answer could be more interesting. Where does the n'th card end up after m times the deck is dealt?
- 04 Apr '13 09:36Let's list the card 0,1,2,...,51 to make the maths slightly smoother.

Now every number between 0 and 51 can be written uniquely as 4a+b where 0<=a<13 and 0<=b<4 and if a card is in (4a+b)th position then it will end up in the (a+13b)th position after one "shuffle".

The 0th and 51st card are fixed by a shuffle so let's just consider the numbers 1,2,...,50 and let's consider them modulo 51. If we do this then a card in position x before a shuffle will be in position 13x (mod 51) after the shuffle as:

13(4a+b)=52a+13b=a+13b (mod 51)

So after n shuffles a card that started in position x will be in position (13^n)x (mod 51). So the answer to the question is the minimal n such that (13^n)=1 (mod 51). This is 4.