cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A382606 Natural numbers ordered by the probability (highest to lowest) to occur in the sum of repeated rolls of a fair 6-sided die.

This page as a plain text file.
%I A382606 #37 May 06 2025 16:14:48
%S A382606 6,5,11,12,10,16,17,15,21,22,27,23,26,28,32,33,38,37,39,43,44,49,48,
%T A382606 50,54,55,60,59,53,65,61,66,64,70,71,76,75,77,81,82,87,72,86,88,92,93,
%U A382606 98,97,103,99,104,102,108,109,114,115,113,110,119,120,125,124,126
%N A382606 Natural numbers ordered by the probability (highest to lowest) to occur in the sum of repeated rolls of a fair 6-sided die.
%C A382606 The asymptotic probability for large n is 2/7 since the average roll of a die is 7/2.
%C A382606 Only terms with probability > 2/7 occur. - _Michael S. Branicky_, Apr 01 2025
%C A382606 Of any six consecutive integers, at least one is present and gives a maximum in the sequence (i.e., all terms preceding it are smaller). - _Javier Múgica_, May 01 2025
%H A382606 Alois P. Heinz, <a href="/A382606/b382606.txt">Table of n, a(n) for n = 1..10000</a>
%e A382606 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%.
%e A382606 The probability of achieving a '1' is just 1/6 (about 16.67%). 6 is the highest of all, so a(1) = 6.
%o A382606 (Python)
%o A382606 from fractions import Fraction
%o A382606 from math import factorial, prod
%o A382606 from itertools import count, islice
%o A382606 from sympy.utilities.iterables import partitions
%o A382606 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))
%o A382606 def agen(): # generator of terms
%o A382606     n, vdict = 1, dict()
%o A382606     for k in count(1):
%o A382606         vdict[prob(k)] = k
%o A382606         if k%6 == 0:
%o A382606             s = [vdict[v] for v in sorted(vdict, reverse=True) if v > Fraction(2, 7)]
%o A382606             yield from (s[i-1] for i in range(n, len(s)-1))
%o A382606             n = len(s) - 1
%o A382606 print(list(islice(agen(), 20))) # _Michael S. Branicky_, Apr 01 2025
%Y A382606 Complement of A382607. Cf. A365443.
%K A382606 nonn
%O A382606 1,1
%A A382606 _Sergio Pimentel_, Mar 31 2025