%I #33 Sep 08 2022 08:46:11
%S 0,1,5,7,10,12,15,17,20,22,25,27,30,32,35,37,40,42,45,47,50,52,55,57,
%T 60,62,65,67,70,72,75,77,80,82,85,87,90,92,95,97,100,102,105,107,110,
%U 112,115,117,120,122,125,127,130,132,135,137,140,142,145,147,150,152,155,157,160,162
%N Minimal most likely sum for a roll of n 4-sided dice.
%C In fact ceiling(5n/2) and floor(5n/2) have the same probability.
%C a(n) equals A047215(n) except for n=1.
%H Colin Barker, <a href="/A256680/b256680.txt">Table of n, a(n) for n = 0..1000</a>
%H Ran Pan, <a href="http://www.math.ucsd.edu/~projectp/warmups/eG.html">Exercise G</a>, Project P
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F a(n) = floor(5*n/2), for n>=2; a(0)=0 and a(1)=1.
%F From _Colin Barker_, Apr 08 2015: (Start)
%F a(n) = (-1+(-1)^n+10*n)/4 for n>1.
%F a(n) = a(n-1)+a(n-2)-a(n-3) for n>4.
%F G.f.: -x*(x^3-x^2-4*x-1) / ((x-1)^2*(x+1)).
%F (End)
%e For n=1, there are four equally likely outcomes, 1,2,3,4, and the smallest of these is 1, so a(1)=1.
%p a:= n-> iquo(5*n, 2) -`if`(n=1, 1, 0):
%p seq(a(n), n=0..80); # _Alois P. Heinz_, Apr 08 2015
%t Join[{0, 1}, Table[Floor[5 n/2], {n, 2, 100}]]
%o (Magma) [n le 1 select n else Floor(5*n/2): n in [0..70]]; // _Vincenzo Librandi_, Apr 08 2015
%o (PARI) a(n)=if(n<2,n,5*n\2) \\ _Charles R Greathouse IV_, Apr 08 2015
%o (PARI) concat(0, Vec(-x*(x^3-x^2-4*x-1)/((x-1)^2*(x+1)) + O(x^100))) \\ _Colin Barker_, Apr 08 2015
%Y Cf. A030123, A047215.
%K nonn,easy
%O 0,3
%A _Ran Pan_, Apr 08 2015
|