A382607 Natural numbers ordered by the probability (lowest to highest) to occur in the sum of repeated rolls of a fair 6-sided die.
1, 2, 3, 7, 4, 8, 13, 9, 14, 19, 18, 24, 25, 20, 30, 29, 31, 35, 36, 41, 40, 34, 46, 42, 47, 45, 51, 52, 57, 56, 58, 62, 63, 68, 67, 69, 73, 74, 79, 78, 84, 80, 85, 83, 89, 90, 95, 94, 96, 100, 101, 91, 106, 105, 107, 111, 112, 117, 116, 122, 118, 123, 128, 127
Offset: 1
Keywords
Examples
The probability of achieving a '6' in n>=6 rolls is 1/6 + 5/36 + 10/216 + 10/1296 + 5/7776 + 1/46656 which is about 36.02%. The probability of achieving a '1' is just 1/6 (about 16.67%). 1 is the lowest of all, so a(1)=1.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Programs
-
Python
from fractions import Fraction from math import factorial, prod from itertools import count, islice from sympy.utilities.iterables import partitions def prob(n): return sum(factorial(N:=sum(p.values()))//prod(factorial(v) for v in p.values())*Fraction(1, 6**N) for p in partitions(n, k=6)) def agen(): # generator of terms n, vdict = 1, dict() for k in count(1): vdict[prob(k)] = k if k%6 == 0: s = [vdict[v] for v in sorted(vdict) if v < Fraction(2, 7)] yield from (s[i-1] for i in range(n, len(s)-1)) n = len(s) - 1 print(list(islice(agen(), 20))) # Michael S. Branicky, Apr 01 2025
Comments