The states of the Kings don't count. The following program counts the probability of each of the 12 other possible values, adding mod 13, for each stage of counting Aces, deuces, etc. with probability 1/16, 1/4, 3/8, 1/4 and 1/6 of getting 0 through 4 face-up of that denomination, and considers adding, mod 13, that many times the probability of each, to contribute to the probability of that augmented value, before considering the next denomination:
10 dim Prob(12),TransP(4),Chg(4),NewProb(12)
20 Prob(0)=1
30 TransP(0)=1//16:TransP(1)=1//4:TransP(2)=6//16:TransP(3)=1//4:TransP(4)=1//16
40 for Denom=1 to 12
50 for I=0 to 4
60 Chg(I)=(Denom*I)@13
70 next
80 erase NewProb()
90 dim NewProb(12)
100 for I=0 to 12
110 for J=0 to 4
120 V=(I+Chg(J))@13
130 NewProb(V)=NewProb(V)+Prob(I)*TransP(J)
140 next J
150 next I
155 for I=0 to 12:Prob(I)=NewProb(I):next
160 next Denom
170 print Prob(0),1/Prob(0)
The result is 5412980321359/70368744177664 ~= 1/12.9999999999994457766
The table below shows the probabilities of the values of the total mod 13, first after all the showing aces are counted, then after the aces and deuces, etc.
After 1's
0 1/16 = 0.0625
1 1/4 = 0.25
2 3/8 = 0.375
3 1/4 = 0.25
4 1/16 = 0.0625
5 0 = 0
6 0 = 0
7 0 = 0
8 0 = 0
9 0 = 0
10 0 = 0
11 0 = 0
12 0 = 0
After 2's
0 1/256 = 0.00390625
1 1/64 = 0.015625
2 5/128 = 0.0390625
3 5/64 = 0.078125
4 31/256 = 0.12109375
5 5/32 = 0.15625
6 11/64 = 0.171875
7 5/32 = 0.15625
8 31/256 = 0.12109375
9 5/64 = 0.078125
10 5/128 = 0.0390625
11 1/64 = 0.015625
12 1/256 = 0.00390625
After 3's
0 409/4096 = 0.099853515625
1 47/512 = 0.091796875
2 165/2048 = 0.08056640625
3 275/4096 = 0.067138671875
4 235/4096 = 0.057373046875
5 105/2048 = 0.05126953125
6 105/2048 = 0.05126953125
7 235/4096 = 0.057373046875
8 275/4096 = 0.067138671875
9 165/2048 = 0.08056640625
10 47/512 = 0.091796875
11 409/4096 = 0.099853515625
12 213/2048 = 0.10400390625
After 4's
0 4869/65536 = 0.0742950439453125
1 4869/65536 = 0.0742950439453125
2 2451/32768 = 0.074798583984375
3 2489/32768 = 0.075958251953125
4 5067/65536 = 0.0773162841796875
5 1285/16384 = 0.07843017578125
6 5199/65536 = 0.0793304443359375
7 2613/32768 = 0.079742431640625
8 5199/65536 = 0.0793304443359375
9 1285/16384 = 0.07843017578125
10 5067/65536 = 0.0773162841796875
11 2489/32768 = 0.075958251953125
12 2451/32768 = 0.074798583984375
After 5's
0 20161/262144 = 0.076908111572265625
1 80665/1048576 = 0.0769281387329101562
2 80685/1048576 = 0.0769472122192382812
3 20175/262144 = 0.076961517333984375
4 40353/524288 = 0.0769672393798828125
5 20175/262144 = 0.076961517333984375
6 80685/1048576 = 0.0769472122192382812
7 80665/1048576 = 0.0769281387329101562
8 20161/262144 = 0.076908111572265625
9 40313/524288 = 0.0768909454345703125
10 80615/1048576 = 0.0768804550170898437
11 80615/1048576 = 0.0768804550170898437
12 40313/524288 = 0.0768909454345703125
After 6's
0 1290555/16777216 = 0.076923072338104248
1 1290555/16777216 = 0.076923072338104248
2 1290555/16777216 = 0.076923072338104248
3 322639/4194304 = 0.0769231319427490234
4 1290555/16777216 = 0.076923072338104248
5 1290555/16777216 = 0.076923072338104248
6 1290555/16777216 = 0.076923072338104248
7 1290555/16777216 = 0.076923072338104248
8 1290555/16777216 = 0.076923072338104248
9 1290555/16777216 = 0.076923072338104248
10 1290555/16777216 = 0.076923072338104248
11 1290555/16777216 = 0.076923072338104248
12 1290555/16777216 = 0.076923072338104248
After 7's
0 1290555/16777216 = 0.076923072338104248
1 1290555/16777216 = 0.076923072338104248
2 1290555/16777216 = 0.076923072338104248
3 20648881/268435456 = 0.0769230760633945465
4 10324443/134217728 = 0.0769230946898460388
5 20648881/268435456 = 0.0769230760633945465
6 1290555/16777216 = 0.076923072338104248
7 1290555/16777216 = 0.076923072338104248
8 1290555/16777216 = 0.076923072338104248
9 1290555/16777216 = 0.076923072338104248
10 5162221/67108864 = 0.0769230872392654418
11 5162221/67108864 = 0.0769230872392654418
12 1290555/16777216 = 0.076923072338104248
After 8's
0 82595527/1073741824 = 0.0769230788573622703
1 82595527/1073741824 = 0.0769230788573622703
2 41297763/536870912 = 0.0769230779260396957
3 330382089/4294967296 = 0.0769230744335800409
4 165191045/2147483648 = 0.0769230746664106845
5 330382097/4294967296 = 0.0769230762962251901
6 165191051/2147483648 = 0.0769230774603784084
7 82595529/1073741824 = 0.0769230807200074195
8 165191051/2147483648 = 0.0769230774603784084
9 330382097/4294967296 = 0.0769230762962251901
10 165191045/2147483648 = 0.0769230746664106845
11 330382089/4294967296 = 0.0769230744335800409
12 41297763/536870912 = 0.0769230779260396957
After 9's
0 5286113585/68719476736 = 0.0769230767764383926
1 82595525/1073741824 = 0.0769230769947171211
2 5286113581/68719476736 = 0.0769230767182307317
3 5286113605/68719476736 = 0.0769230770674766972
4 2643056797/34359738368 = 0.0769230769074056297
5 5286113595/68719476736 = 0.0769230769219575449
6 5286113595/68719476736 = 0.0769230769219575449
7 2643056797/34359738368 = 0.0769230769074056297
8 5286113605/68719476736 = 0.0769230770674766972
9 5286113581/68719476736 = 0.0769230767182307317
10 82595525/1073741824 = 0.0769230769947171211
11 5286113585/68719476736 = 0.0769230767764383926
12 330382101/4294967296 = 0.0769230772275477647
After 10's
0 84577817515/1099511627776 = 0.0769230769174100714
1 84577817525/1099511627776 = 0.0769230769265050184
2 84577817531/1099511627776 = 0.0769230769319619867
3 21144454379/274877906944 = 0.0769230769183195661
4 84577817515/1099511627776 = 0.0769230769174100714
5 84577817519/1099511627776 = 0.0769230769210480502
6 42288908767/549755813888 = 0.0769230769346904708
7 84577817519/1099511627776 = 0.0769230769210480502
8 84577817515/1099511627776 = 0.0769230769174100714
9 21144454379/274877906944 = 0.0769230769183195661
10 84577817531/1099511627776 = 0.0769230769319619867
11 84577817525/1099511627776 = 0.0769230769265050184
12 84577817515/1099511627776 = 0.0769230769174100714
After 11's
0 338311270095/4398046511104 = 0.0769230769253681501
1 1353245080295/17592186044416 = 0.0769230769205364595
2 676622540193/8796093022208 = 0.0769230769257092106
3 1353245080295/17592186044416 = 0.0769230769205364595
4 338311270095/4398046511104 = 0.0769230769253681501
5 676622540153/8796093022208 = 0.0769230769211617371
6 1353245080365/17592186044416 = 0.0769230769245154988
7 338311270081/4398046511104 = 0.0769230769221849186
8 1353245080345/17592186044416 = 0.0769230769233786304
9 1353245080345/17592186044416 = 0.0769230769233786304
10 338311270081/4398046511104 = 0.0769230769221849186
11 1353245080365/17592186044416 = 0.0769230769245154988
12 676622540153/8796093022208 = 0.0769230769211617371
After 12's
0 5412980321359/70368744177664 = 0.0769230769230802025
1 21651921285435/281474976710656 = 0.0769230769230766497
2 21651921285435/281474976710656 = 0.0769230769230766497
3 21651921285435/281474976710656 = 0.0769230769230766497
4 21651921285435/281474976710656 = 0.0769230769230766497
5 21651921285435/281474976710656 = 0.0769230769230766497
6 21651921285435/281474976710656 = 0.0769230769230766497
7 21651921285435/281474976710656 = 0.0769230769230766497
8 21651921285435/281474976710656 = 0.0769230769230766497
9 21651921285435/281474976710656 = 0.0769230769230766497
10 21651921285435/281474976710656 = 0.0769230769230766497
11 21651921285435/281474976710656 = 0.0769230769230766497
12 21651921285435/281474976710656 = 0.0769230769230766497
|