login
A365443
Triangle read by rows: T(n,s) is the numerator of the probability that the sum s occurs when repeated rolls of an n-sided die are summed for s = 0..2n.
1
1, 1, 1, 1, 1, 1, 3, 5, 11, 1, 1, 4, 16, 37, 121, 376, 1, 1, 5, 25, 125, 369, 1589, 6665, 26925, 1, 1, 6, 36, 216, 1296, 4651, 24781, 129936, 667116, 3327696, 1, 1, 7, 49, 343, 2401, 16807, 70993, 450295, 2825473, 17492167, 106442161, 633074071, 1, 1, 8, 64
OFFSET
0,7
COMMENTS
The triangle is formed by considering the probability of occurrence of a zero-indexed sum, s, of repeated rolls of an n-sided die. The probability is obtained by considering that the sum s = 0 appears with probability 1, and then for every s > 0, the sum s has a probability of appearing that is 1/n times the sum of the probability of appearing of each of the previous n values of s. The denominator of this probability is n^s, and the numerator is given in the rows of the triangle below.
For example, consider repeated rolls of an n=4-sided die. Looking at the corresponding portion of the sequence (i.e., 1, 1, 3, 5, 11), the probability that s = 0 occurs is 1/1, the probability that s = 1 occurs is 1/(n^s) = 1/4, the probability that s = 2 occurs is 5/(n^s) = 5/16, as there is a 1/4 chance that it is rolled from the start plus the 1/16 chance that it occurs when two consecutive 1's are rolled, and so on. Hence the probability for all s <= n numbers that can be rolled is (n+1)^(s-1)/n^s, with a global maximum at s = n.
However, for s > n, where there is no longer the chance that the sum occurs in a single roll, the fraction drops precipitously. It then resumes rising until s = floor((n+1)^(n+1)/n^n - n) (see A366451) which is the s having the maximum probability for s > n. Therefore this maximum will always occur at s <= 2n for all nontrivial dice (i.e., dice with n > 1 sides). Hence the rows of this triangle have been terminated at 2n since that guarantees the maximum, but a row could in principle be extended in perpetuity, wherein the fraction would stabilize about the value 2/(n+1).
FORMULA
T(n,s) = 1 for s = 0,
(n+1)^(s-1) for 0 < s <= n,
(n+1)^(s-1) - (n+1)^(s-n-2)*s*n^n for n < s <= 2n.
EXAMPLE
n
0 | 1
1 | 1 1 1
2 | 1 1 3 5 11
3 | 1 1 4 16 37 121 376
4 | 1 1 5 25 125 369 1589 6665 26925
5 | 1 1 6 36 216 1296 4651 24781 129936 667116 3327696
PROG
(Python)
def Pn(n, s): # probability numerator of rolling s with an n-sided die
if s==0: return 1
elif s>n: return int((n+1)**(s-n-2)*(n*(n+1)**n-n**n*s+(n+1)**n))
else: return (n+1)**(s-1)
[Pn(n, s) for n in range(10) for s in range(2*n+1)]
CROSSREFS
Cf. A366451.
Sequence in context: A354389 A297422 A064523 * A268034 A286567 A258862
KEYWORD
nonn,tabf,frac
AUTHOR
STATUS
approved