login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A366995 a(n) is the numerator of the expected end time of a game with three gamblers, one of which starts with capital n, the others with capital 1 each, conditional on the event that one of the two poor players wins. 3
3, 39, 359, 2477, 119667, 1522705, 46419629, 6143100517, 5472109127035, 790136773603303, 278129286200597661, 16684426086791338103, 503067648850136040148699, 2626565018569118643191009, 10920130209346850287269887104735, 236686188450953790757840351941895 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
In each round of the game, 1 unit is transferred from one randomly chosen player to another. Players play until they are out of money, so when the first player is out the other two continue to play. The winner is the player who ends up with all n+2 units of money.
LINKS
Pontus von Brömssen, Table of n, a(n) for n = 1..53
Persi Diaconis and Stewart N. Ethier, Gambler’s ruin and the ICM, Statist. Sci. 37 (3) 289-305, August 2022.
Persi Diaconis, Gambler's ruin with k gamblers, slides from talk in the Rutgers Experimental Mathematics Seminar, Fall 2023 Semester, Oct 12, 2023.
Experimental Mathematics, Gambler’s ruin with k gamblers, recording of talk, Vimeo video, Oct 22, 2023.
PROG
(Sage)
from itertools import permutations
def T(n):
nodes = [(i, j) for i in range(n+2) for j in range((n+2-i)//2+1)]
m = len(nodes)
Q0 = {x:{y:0 for y in nodes} for x in nodes}
for x in nodes:
c1 = x+(n+2-sum(x), )
for i, j in permutations(range(3), int(2)):
if c1[i] and c1[j]:
c2 = list(c1)
c2[i] -= 1
c2[j] += 1
y = (c2[0], min(c2[1:]))
if c2[0] != n+2:
Q0[x][y] += n+2-c2[0]
Q0 = matrix(QQ, [list(R.values()) for R in Q0.values()])
s = sum(Q0.columns())
Q = identity_matrix(QQ, m-1)
for i in range(1, m):
for j in range(1, m):
if s[i] != 0: Q[i-1, j-1] -= Q0[i, j]/s[i]
return (Q**(-1)*ones_matrix(QQ, m-1))[-2, 0]
def A366995(n):
return T(n).numerator()
def A366996(n):
return T(n).denominator()
CROSSREFS
Cf. A366566 (a(n)/A366996(n) rounded to nearest integer), A366996 (denominators).
Sequence in context: A342969 A050392 A292294 * A191468 A203243 A063035
KEYWORD
nonn,frac
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 11:10 EDT 2024. Contains 372019 sequences. (Running on oeis4.)