%I #15 Jun 01 2017 04:34:30
%S 0,3,15,73,432,2466,12690,67628,395896,2378907,14778790,93389066,
%T 562139796,3163874871,17458695226,100299771120,608013094016,
%U 3788103579016,23633567094114,145391247840963,873481016484060,5103300936908811,29074526437910272,163299878621689106
%N Number of possibilities of getting a prime sum when rolling n six-sided dice.
%C 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.
%H Giovanni Resta, <a href="/A224397/b224397.txt">Table of n, a(n) for n = 0..120</a>
%H C. Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_684.htm">Puzzle 684 - Primes in N dice</a>.
%t 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 *)
%o (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.
%K nonn
%O 0,2
%A _M. F. Hasler_, Apr 05 2013
%E a(11)-a(23) from _Giovanni Resta_, Apr 06 2013