|
|
A224397
|
|
Number of possibilities of getting a prime sum when rolling n six-sided dice.
|
|
1
|
|
|
0, 3, 15, 73, 432, 2466, 12690, 67628, 395896, 2378907, 14778790, 93389066, 562139796, 3163874871, 17458695226, 100299771120, 608013094016, 3788103579016, 23633567094114, 145391247840963, 873481016484060, 5103300936908811, 29074526437910272, 163299878621689106
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Possibilities are counted "with repetition", i.e., rolling 2+3 and 3+2 counts as two possibilities. Otherwise said, the probability of getting a prime sum when rolling n six-sided dice, multiplied by 6^n.
|
|
LINKS
|
|
|
MATHEMATICA
|
a[n_] := Block[{pc}, pc[w_] := n! / Times @@ ((Length /@ Split@w)!); Sum[Total[pc /@ IntegerPartitions[p, {n}, Range@6]], {p, Prime@ Range@ PrimePi[6*n]}]]; Array[a, 20] (* Giovanni Resta, Apr 06 2013 *)
|
|
PROG
|
(PARI) a(n, s=0)=forvec(v=vector(n, i, [1, 6]), isprime(sum(i=1, n, v[i])) && s++); s \\ Illustrative purpose only, impractical for n>>7.
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|