# Arranging cards so that no two consecutive values remain consecutive

Let us say we have 52 cards with values ranging from 1-13 (4 sets of cards from 1-13). Assume that you wanted no two consecutive values to be next to each other in the pile of cards. For example, a 3 cannot be next to a 2 or a 4. How many ways can I arrange these cards that there are no consecutive values next to each other?

Can someone suggest a permutation that fulfills these requirements or suggest a computer program to solve the problem?

• I do not believe this is a trivial problem. The answer will come from some integral of $e^{-x}$ type of function. Would be interested to see an easier solution. ! – Shailesh Oct 24 '15 at 16:38

• the total number of ways is $(52!)/(4*4!)$ though not 52! – Jaywalker Oct 22 '15 at 15:14
• $(52!)/(13*4!)$ sry – Jaywalker Oct 23 '15 at 7:04
• Please see my comment I have placed after the question. Also, the total number of ways should be $52!/(4!)^{13}$ – Shailesh Oct 24 '15 at 16:40