login
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
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.
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
Sequence in context: A124543 A007142 A357222 * A190010 A151326 A063000
KEYWORD
nonn
AUTHOR
_M. F. Hasler_, Apr 05 2013
EXTENSIONS
a(11)-a(23) from _Giovanni Resta_, Apr 06 2013
STATUS
approved