A382606 Natural numbers ordered by the probability (highest to lowest) to occur in the sum of repeated rolls of a fair 6-sided die.
6, 5, 11, 12, 10, 16, 17, 15, 21, 22, 27, 23, 26, 28, 32, 33, 38, 37, 39, 43, 44, 49, 48, 50, 54, 55, 60, 59, 53, 65, 61, 66, 64, 70, 71, 76, 75, 77, 81, 82, 87, 72, 86, 88, 92, 93, 98, 97, 103, 99, 104, 102, 108, 109, 114, 115, 113, 110, 119, 120, 125, 124, 126
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%). 6 is the highest of all, so a(1) = 6.
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, reverse=True) 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