Best Answer bonanova, 29 April 2013 - 11:39 AM

Spoiler for Comparing the two approaches:

Go to the full post
It is clear that the probability is greater than 1/13 by a small amount.

I considered decks small enough to enumerate. I noticed a pattern in the excess numbers of cases that were divisible by 13. I chose a single and double suited deck with 13 cards per suit, and a smaller deck that had 7 cards per suit, and one, two, three, and four suits. This led to a simple function for the excess cases that had zero remainder when divided by 13 (or in the second case by 7), and an equal number of cases for each non-zero remainder.

When I later looked at single-suited decks with 2 to 20 cards per suit, the simple relationship no longer held. It turns out that each prime factor of outcomes behaved regularly. Seven cards per suit was predictable, but fourteen cards exhibited the seven card pattern twice. So I knew the simple formula gave too high a result. But I was not able to figure out, precisely what it was. Even though it was too large, it was dwarfed by all the other numbers, so my result of "very slightly greater than 1/13" was accurate.

I considered decks small enough to enumerate. I noticed a pattern in the excess numbers of cases that were divisible by 13. I chose a single and double suited deck with 13 cards per suit, and a smaller deck that had 7 cards per suit, and one, two, three, and four suits. This led to a simple function for the excess cases that had zero remainder when divided by 13 (or in the second case by 7), and an equal number of cases for each non-zero remainder.

When I later looked at single-suited decks with 2 to 20 cards per suit, the simple relationship no longer held. It turns out that each prime factor of outcomes behaved regularly. Seven cards per suit was predictable, but fourteen cards exhibited the seven card pattern twice. So I knew the simple formula gave too high a result. But I was not able to figure out, precisely what it was. Even though it was too large, it was dwarfed by all the other numbers, so my result of "very slightly greater than 1/13" was accurate.

__The general formula for the probability__involves a term*, which represents the excess number of cases for exact divisibility by 13, and which is very very much smaller than 2***a**^{52}:

* p* = 1/13 (1 +

*/2*

**a**^{52})

My estimate was * a* = 12 x 2

**, giving a correction factor**

^{13}*/2*

**a**^{52}of about 10

^{-11}.

Using the generating function described in hints given by **BMAD**,

a smaller value is found: * a* = 12 x 2

**, giving a correction factor of about 10**

^{4}^{-14}.

Thus, in summary,

My value:

* p* =

**0.076 923 076 924 755 97...**=

**1/12.999 999 999 716 24...**

Generating-function value:

**p = 0.076 923 076 923 080 20 ...** = **1/12.999 999 999 999 44...**