OFFSET
1,1
COMMENTS
Such a game can be implemented, for instance, by rolling a single die per round, with A winning the round if the numbers are 1 to 4 and B winning if the numbers are 5 and 6.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..1000
IBM Research, A Dice Game, Ponder This Challenge, February 2024.
FORMULA
See the solution page of the "Ponder This" challenge for the formula derived from the Markov matrix representing the rules of the game.
Numerator of 2^(n-1)*(3^n-1)/(3^n-2^n). - Chai Wah Wu, Mar 07 2024
EXAMPLE
a(n)/A370824(n) for n = 1..11: 2/1, 16/5, 104/19, 128/13, 3872/211, 3328/95, 139904/2059, 167936/1261, 5038592/19171, 2748416/5275, 7886848/7613.
MATHEMATICA
Array[Numerator[(3^#-1)/((3/2)^#-1)/2] &, 35] (* Paolo Xausa, Mar 13 2024 *)
PROG
(PARI) a370823_4(n, A=2/3, B=1/3) = my (an=A^n, bn=B^n); (1-A) * an * (1-bn) / ((1-B) * bn * (1-an));
\\ or by determination of the eigenvalues of the Markov matrix
a370823_4(n, na=2, nb=1) = { if (n==1, na/nb, my (ntot=na+nb, A=na/ntot, B=nb/ntot, M=matrix(2*n+1)); M[1, 2]=A; M[1, 3]=B; for (rp=1, n-1, my (rb=2*rp+1, ra=rb-1); M[ra, 3]=B; M[rb, 2]=A; M[ra, ra+2]=A; M[rb, rb+2]=B); M[2*n, 2*n]=M[2*n+1, 2*n+1]=1; my (ME=mateigen(M)); ME[1, 2]/ME[1, 3])};
numerator(a370823_4(n))
(Python)
from math import gcd
def A370823(n): return (a:=3**n-1<<n-1)//gcd(a, 3**n-(1<<n)) # Chai Wah Wu, Mar 07 2024
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Hugo Pfoertner, Mar 02 2024
STATUS
approved